|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.gsfc.drl.rtstps.core.ccsds.path.PacketRouter
final class PacketRouter
This class receives packets. It contains a map of PacketReceivers keyed by packet application id. It sends a packet to a PacketReceiver based on the matching application id. This class is almost always attached to a Path Service node.
Field Summary | |
---|---|
private PacketReceiver |
deadletters
|
private LongStatusItem |
deletedPackets
|
private LongStatusItem |
idlePackets
|
private java.lang.String |
name
|
private java.util.TreeMap<java.lang.Integer,PacketReceiver> |
output
|
private LongStatusItem |
sentPackets
|
private LongStatusItem |
unrouteablePackets
|
Constructor Summary | |
---|---|
PacketRouter(java.lang.String name,
java.util.Collection<StatusItem> statusItemList)
Create a PacketRouter. |
Method Summary | |
---|---|
(package private) void |
addPacketReceiver(int applicationId,
PacketReceiver pr)
Add a packet receiver to this class' receiver list. |
void |
flush()
Flush the pipeline. |
java.lang.String |
getLinkName()
Get this receiver's name (for error messages). |
void |
putPacket(Packet packet)
Give a packet to this PacketReceiver. |
void |
putPackets(Packet[] packets)
Give an array of packets to this PacketReceiver. |
(package private) void |
setDeadLetterPath(PacketReceiver pp)
Set a receiver to which this class sends unrouteable packets. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private java.lang.String name
private java.util.TreeMap<java.lang.Integer,PacketReceiver> output
private PacketReceiver deadletters
private LongStatusItem unrouteablePackets
private LongStatusItem sentPackets
private LongStatusItem idlePackets
private LongStatusItem deletedPackets
Constructor Detail |
---|
PacketRouter(java.lang.String name, java.util.Collection<StatusItem> statusItemList)
Method Detail |
---|
public java.lang.String getLinkName()
PacketReceiver
getLinkName
in interface PacketReceiver
getLinkName
in interface Receiver
void addPacketReceiver(int applicationId, PacketReceiver pr)
void setDeadLetterPath(PacketReceiver pp)
public void putPackets(Packet[] packets) throws RtStpsException
putPackets
in interface PacketReceiver
RtStpsException
public void putPacket(Packet packet) throws RtStpsException
putPacket
in interface PacketReceiver
RtStpsException
public void flush() throws RtStpsException
flush
in interface PacketReceiver
flush
in interface Receiver
RtStpsException
public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |