|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PacketListener
PacketListener is an interface for objects wanting to listen for Packet events.
Method Summary | |
---|---|
void |
packetArrived(Packet p,
double time,
boolean repeat)
Event called when a Packet arrives at its destination. |
void |
packetOriginated(Packet p,
double time)
Event called when a Packet is given to a Node for sending. |
void |
reportTotalHops(Packet p,
int hops,
double distance)
Event called when a Packet is is passed to a new node, including the terminating node. |
Method Detail |
---|
void packetOriginated(Packet p, double time)
p
- non-null Packettime
- Time of origination.void reportTotalHops(Packet p, int hops, double distance)
p
- non-null Packettime
- Time of origination.void packetArrived(Packet p, double time, boolean repeat)
p
- non-null Packet that arrivedtime
- Time of arrival, which is after time of origination for this Packetrepeat
- true if another copy of the Packet arrived, false if first time.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |