public class BehaviorConsumerThreaded extends java.lang.Object implements BehaviorConsumerIF, java.lang.Runnable
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 and Description |
|---|
BehaviorConsumerThreaded() |
| Modifier and Type | Method and Description |
|---|---|
void |
receivePdu(Pdu pdu)
Receives a PDU from the BehaviorProducer.
|
void |
run()
Implementation of the Runnable interface
|
public void receivePdu(Pdu pdu)
receivePdu in interface BehaviorConsumerIFpdu - the ProtocolDataUnit generated by the BehaviorProducerpublic void run()
run in interface java.lang.Runnable