public abstract class DefaultPacketContext extends java.lang.Object implements PacketContext
| Modifier | Constructor and Description |
|---|---|
protected |
DefaultPacketContext(long time,
InboundPacket inPkt,
OutboundPacket outPkt,
boolean block)
Creates a new packet context.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
block()
Blocks the outbound packet from being sent from this point onward.
|
InboundPacket |
inPacket()
Returns the inbound packet being processed.
|
boolean |
isHandled()
Indicates whether the outbound packet is handled, i.e.
|
OutboundPacket |
outPacket()
Returns the view of the outbound packet.
|
abstract void |
send()
Triggers the outbound packet to be sent.
|
long |
time()
Returns the time when the packet was received.
|
TrafficTreatment.Builder |
treatmentBuilder()
Returns a builder for constructing traffic treatment.
|
protected DefaultPacketContext(long time,
InboundPacket inPkt,
OutboundPacket outPkt,
boolean block)
time - creation timeinPkt - inbound packetoutPkt - outbound packetblock - whether the context is blocked or notpublic long time()
PacketContexttime in interface PacketContextpublic InboundPacket inPacket()
PacketContextinPacket in interface PacketContextpublic OutboundPacket outPacket()
PacketContextoutPacket in interface PacketContextpublic TrafficTreatment.Builder treatmentBuilder()
PacketContexttreatmentBuilder in interface PacketContextpublic abstract void send()
PacketContextsend in interface PacketContextpublic boolean block()
PacketContextblock in interface PacketContextpublic boolean isHandled()
PacketContextisHandled in interface PacketContext