Package org.onosproject.net.packet
Class DefaultOutboundPacket
- java.lang.Object
- 
- org.onosproject.net.packet.DefaultOutboundPacket
 
- 
- All Implemented Interfaces:
- OutboundPacket
 
 public final class DefaultOutboundPacket extends Object implements OutboundPacket Default implementation of an immutable outbound packet.
- 
- 
Constructor SummaryConstructors Constructor 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.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ByteBufferdata()Returns immutable view of the raw data to be sent.booleanequals(Object obj)inthashCode()PortNumberinPort()Returns the input port of this packet.DeviceIdsendThrough()Returns the identity of a device through which this packet should be sent.StringtoString()TrafficTreatmenttreatment()Returns how the outbound packet should be treated.
 
- 
- 
- 
Constructor Detail- 
DefaultOutboundPacketpublic DefaultOutboundPacket(DeviceId sendThrough, TrafficTreatment treatment, ByteBuffer data) Creates an immutable outbound packet.- Parameters:
- sendThrough- identifier through which to send the packet
- treatment- list of packet treatments
- data- raw packet data
 
 - 
DefaultOutboundPacketpublic DefaultOutboundPacket(DeviceId sendThrough, TrafficTreatment treatment, ByteBuffer data, PortNumber inPort) Creates an immutable outbound packet.- Parameters:
- sendThrough- identifier through which to send the packet
- treatment- list of packet treatments
- data- raw packet data
- inPort- input port to be used for the packet
 
 
- 
 - 
Method Detail- 
sendThroughpublic DeviceId sendThrough() Description copied from interface:OutboundPacketReturns the identity of a device through which this packet should be sent.- Specified by:
- sendThroughin interface- OutboundPacket
- Returns:
- device identity
 
 - 
treatmentpublic TrafficTreatment treatment() Description copied from interface:OutboundPacketReturns how the outbound packet should be treated.- Specified by:
- treatmentin interface- OutboundPacket
- Returns:
- output treatment
 
 - 
datapublic ByteBuffer data() Description copied from interface:OutboundPacketReturns immutable view of the raw data to be sent.- Specified by:
- datain interface- OutboundPacket
- Returns:
- data to emit
 
 - 
inPortpublic PortNumber inPort() Description copied from interface:OutboundPacketReturns the input port of this packet. Defaults to controller port. This is useful for actions that involve the input port such as ALL or FLOOD.- Specified by:
- inPortin interface- OutboundPacket
- Returns:
- the input port to be used for this packet.
 
 
- 
 
-