Package org.onosproject.net.packet
Interface PacketContext
- 
- All Known Implementing Classes:
- DefaultPacketContext
 
 public interface PacketContextRepresents context for processing an inbound packet, and (optionally) emitting a corresponding outbound packet.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanblock()Blocks the outbound packet from being sent from this point onward.InboundPacketinPacket()Returns the inbound packet being processed.booleanisHandled()Indicates whether the outbound packet is handled, i.e.OutboundPacketoutPacket()Returns the view of the outbound packet.voidsend()Triggers the outbound packet to be sent.longtime()Returns the time when the packet was received.TrafficTreatment.BuildertreatmentBuilder()Returns a builder for constructing traffic treatment.
 
- 
- 
- 
Method Detail- 
timelong time() Returns the time when the packet was received.- Returns:
- the time in millis since start of epoch
 
 - 
inPacketInboundPacket inPacket() Returns the inbound packet being processed.- Returns:
- inbound packet
 
 - 
outPacketOutboundPacket outPacket() Returns the view of the outbound packet.- Returns:
- outbound packet
 
 - 
treatmentBuilderTrafficTreatment.Builder treatmentBuilder() Returns a builder for constructing traffic treatment.- Returns:
- traffic treatment builder
 
 - 
sendvoid send() Triggers the outbound packet to be sent.
 - 
blockboolean block() Blocks the outbound packet from being sent from this point onward.- Returns:
- whether the outbound packet is blocked.
 
 - 
isHandledboolean isHandled() Indicates whether the outbound packet is handled, i.e. sent or blocked.- Returns:
- true uf the packed is handled
 
 
- 
 
-