public final class DefaultInboundPacket extends Object implements InboundPacket
| Constructor and Description |
|---|
DefaultInboundPacket(ConnectPoint receivedFrom,
Ethernet parsed,
ByteBuffer unparsed)
Creates an immutable inbound packet.
|
DefaultInboundPacket(ConnectPoint receivedFrom,
Ethernet parsed,
ByteBuffer unparsed,
Optional<Long> cookie)
Creates an immutable inbound packet with cookie.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<Long> |
cookie()
Returns the cookie in the packet in message.
|
boolean |
equals(Object obj) |
int |
hashCode() |
Ethernet |
parsed()
Returns the parsed form of the packet.
|
ConnectPoint |
receivedFrom()
Returns the device and port from where the packet was received.
|
String |
toString() |
ByteBuffer |
unparsed()
Unparsed packet data.
|
public DefaultInboundPacket(ConnectPoint receivedFrom, Ethernet parsed, ByteBuffer unparsed)
receivedFrom - connection point where receivedparsed - parsed ethernet frameunparsed - unparsed raw bytespublic DefaultInboundPacket(ConnectPoint receivedFrom, Ethernet parsed, ByteBuffer unparsed, Optional<Long> cookie)
receivedFrom - connection point where receivedparsed - parsed ethernet frameunparsed - unparsed raw bytescookie - cookiepublic ConnectPoint receivedFrom()
InboundPacketreceivedFrom in interface InboundPacketpublic Ethernet parsed()
InboundPacketparsed in interface InboundPacketpublic ByteBuffer unparsed()
InboundPacketunparsed in interface InboundPacketpublic Optional<Long> cookie()
InboundPacketcookie in interface InboundPacket