public final class DefaultInboundPacket extends java.lang.Object implements InboundPacket
| Constructor and Description |
|---|
DefaultInboundPacket(ConnectPoint receivedFrom,
Ethernet parsed,
java.nio.ByteBuffer unparsed)
Creates an immutable inbound packet.
|
DefaultInboundPacket(ConnectPoint receivedFrom,
Ethernet parsed,
java.nio.ByteBuffer unparsed,
java.util.Optional<java.lang.Long> cookie)
Creates an immutable inbound packet with cookie.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Optional<java.lang.Long> |
cookie()
Returns the cookie in the packet in message.
|
boolean |
equals(java.lang.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.
|
java.lang.String |
toString() |
java.nio.ByteBuffer |
unparsed()
Unparsed packet data.
|
public DefaultInboundPacket(ConnectPoint receivedFrom, Ethernet parsed, java.nio.ByteBuffer unparsed)
receivedFrom - connection point where receivedparsed - parsed ethernet frameunparsed - unparsed raw bytespublic DefaultInboundPacket(ConnectPoint receivedFrom, Ethernet parsed, java.nio.ByteBuffer unparsed, java.util.Optional<java.lang.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 java.nio.ByteBuffer unparsed()
InboundPacketunparsed in interface InboundPacketpublic java.util.Optional<java.lang.Long> cookie()
InboundPacketcookie in interface InboundPacketpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object