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()
PacketContext
time
in interface PacketContext
public InboundPacket inPacket()
PacketContext
inPacket
in interface PacketContext
public OutboundPacket outPacket()
PacketContext
outPacket
in interface PacketContext
public TrafficTreatment.Builder treatmentBuilder()
PacketContext
treatmentBuilder
in interface PacketContext
public abstract void send()
PacketContext
send
in interface PacketContext
public boolean block()
PacketContext
block
in interface PacketContext
public boolean isHandled()
PacketContext
isHandled
in interface PacketContext