public interface PacketSequencer
Packet listeners
register with the
sequencer to participate in the processing chain orchestrated by the
sequencer.
Modifier and Type | Method and Description |
---|---|
void |
addPacketListener(SequencedPacketListener listener,
PacketListenerRole role,
int altitude)
Adds the specified packet listener to the sequencer, in the
specified role and at the specified altitude.
|
void |
addPacketListener(SequencedPacketListener listener,
PacketListenerRole role,
int altitude,
Set<ProtocolId> interest)
Adds the specified packet listener to the sequencer, in the
specified role and at the specified altitude.
|
List<SplMetric> |
getSplMetrics()
Returns a snapshot of the metrics collected for the registered
sequenced packet listeners . |
void |
removePacketListener(SequencedPacketListener listener)
Removes the specified packet listener from the sequencer.
|
void addPacketListener(SequencedPacketListener listener, PacketListenerRole role, int altitude)
The listener's event()
callback
will be invoked for every Packet-In message that the controller
passes to the packet sequencer.
listener
- the listener to be addedrole
- the role the listener wishes to assumealtitude
- the listener's altitudeNullPointerException
- if listener or role is nullIllegalArgumentException
- if altitude is negativeIllegalStateException
- if the altitude (for the role)
has already been claimedvoid addPacketListener(SequencedPacketListener listener, PacketListenerRole role, int altitude, Set<ProtocolId> interest)
The interest
argument specifies the protocols that the listener
cares about. When the sequencer receives a Packet-In message,
it will be forwarded to the listener if the packet contains any protocol
that is a member of the specified set.
listener
- the listener to be addedrole
- the role the listener wishes to assumealtitude
- the listener's altitudeinterest
- the protocols the listener is interested inNullPointerException
- if listener or role is nullIllegalArgumentException
- if altitude is negativeIllegalStateException
- if the altitude (for the role)
has already been claimedvoid removePacketListener(SequencedPacketListener listener)
listener
- the listener to be removedNullPointerException
- if listener is nullList<SplMetric> getSplMetrics()
sequenced packet listeners
. Note that
the list is returned in the same order that the packet listeners get
to see and process the packets.Copyright © 2015. All Rights Reserved.