public final class DefaultOutboundPacket extends Object implements OutboundPacket
Constructor and Description |
---|
DefaultOutboundPacket(DeviceId sendThrough,
TrafficTreatment treatment,
ByteBuffer data)
Creates an immutable outbound packet.
|
DefaultOutboundPacket(DeviceId sendThrough,
TrafficTreatment treatment,
ByteBuffer data,
PortNumber inPort)
Creates an immutable outbound packet.
|
Modifier and Type | Method and Description |
---|---|
ByteBuffer |
data()
Returns immutable view of the raw data to be sent.
|
boolean |
equals(Object obj) |
int |
hashCode() |
PortNumber |
inPort()
Returns the input port of this packet.
|
DeviceId |
sendThrough()
Returns the identity of a device through which this packet should be
sent.
|
String |
toString() |
TrafficTreatment |
treatment()
Returns how the outbound packet should be treated.
|
public DefaultOutboundPacket(DeviceId sendThrough, TrafficTreatment treatment, ByteBuffer data)
sendThrough
- identifier through which to send the packettreatment
- list of packet treatmentsdata
- raw packet datapublic DefaultOutboundPacket(DeviceId sendThrough, TrafficTreatment treatment, ByteBuffer data, PortNumber inPort)
sendThrough
- identifier through which to send the packettreatment
- list of packet treatmentsdata
- raw packet datainPort
- input port to be used for the packetpublic DeviceId sendThrough()
OutboundPacket
sendThrough
in interface OutboundPacket
public TrafficTreatment treatment()
OutboundPacket
treatment
in interface OutboundPacket
public ByteBuffer data()
OutboundPacket
data
in interface OutboundPacket
public PortNumber inPort()
OutboundPacket
inPort
in interface OutboundPacket