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.
|
Map<SequencedPacketListener,Long> |
getListenerMetrics()
Returns a set of metrics representing the average processing time
of each listener implementation.
|
List<SequencedPacketListener> |
getListeners(PacketListenerRole role)
Returns an ordered list of packet listeners for the specified role.
|
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<SequencedPacketListener> getListeners(PacketListenerRole role)
role - the role to examineNullPointerException - if role is nullMap<SequencedPacketListener,Long> getListenerMetrics()
event() callback.Copyright © 2014. All Rights Reserved.