public class SequencedPacketAdapter extends Object implements SequencedPacketListener
SequencedPacketListener
that provides default
implementations of the event methods. This class can be extended as an
alternative to implementing SequencedPacketListener directly,
allowing subclasses to rely on the default behavior of methods they don't
want to implement themselves.Constructor and Description |
---|
SequencedPacketAdapter() |
Modifier and Type | Method and Description |
---|---|
void |
errorEvent(ErrorEvent event)
This callback will be invoked if an unexpected error occurred during
the sequencer's attempt to send the Packet-Out message back
to the datapath via the controller, as a result of the packet listener
invoking
PacketOut.send() . |
void |
event(MessageContext context)
Callback invoked when a Packet-In event is to be processed.
|
public void event(MessageContext context)
SequencedPacketListener
The supplied context contains the message event, and is used to capture any processing hints that might be required downstream. This includes possibly modifying a "work-in-progress" Packet-Out message attached to the context, or indicating to the sequencer that the packet should be sent or blocked.
Note that even after a listener indicates that the packet has been handled, the context is still passed down the chain of listeners; no further processing of the packet is possible, but downstream listeners will be able to observe the result of processing.
event
in interface SequencedPacketListener
context
- the message contextpublic void errorEvent(ErrorEvent event)
SequencedPacketListener
PacketOut.send()
.errorEvent
in interface SequencedPacketListener
event
- the error eventCopyright © 2015. All Rights Reserved.