|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.nps.moves.net.BehaviorConsumerThreaded
public class BehaviorConsumerThreaded
Example threaded implementation of the BehaviorConsumerIF interface.
A threaded BehaviorConsumer should be used if it takes a long time to process each DIS packet, or if you want to process the packets in your own thread, rather than the thread used in the BehaviorProducer.
BehaviorProducerIF
,
BehaviorConsumerIF
Constructor Summary | |
---|---|
BehaviorConsumerThreaded()
|
Method Summary | |
---|---|
void |
receivePdu(Pdu pdu)
Receives a PDU from the BehaviorProducer. |
void |
run()
Implementation of the Runnable interface |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BehaviorConsumerThreaded()
Method Detail |
---|
public void receivePdu(Pdu pdu)
receivePdu
in interface BehaviorConsumerIF
pdu
- the ProtocolDataUnit generated by the BehaviorProducerpublic void run()
run
in interface java.lang.Runnable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |