|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BehaviorProducerIF
The BehaviorProducer interface describes a class that listens in its own thread for PDUs, then notifies any listeners when they arrive.
This implements a listener pattern. Those interested in hearing from the BehaviorProducerIF register with the object. When the BehaviorProducerIF gets (or produces) a PDU, it notifies all listeners. Note that there is no attempt to limit which listeners/consumers receive the PDU.
Method Summary | |
---|---|
void |
addListener(BehaviorConsumerIF consumer)
Add a listener that will be notified when a PDU is ready. |
void |
removeListener(BehaviorConsumerIF consumer)
Remove a listener/consumer of PDUs from the notification list. |
void |
setUseCopies(boolean shouldCreateCopy)
This is a performance option. |
Method Detail |
---|
void addListener(BehaviorConsumerIF consumer)
consumer
- the object that will be notified of the PDUvoid removeListener(BehaviorConsumerIF consumer)
consumer
- to be removed from the notification listvoid setUseCopies(boolean shouldCreateCopy)
The default behavior should be to distribute a new, unqiue copy to each listener. this allows the user to override this behavior for better performance.
shouldCreateCopy
- true to create a new copy for each listener, false for a shared copy for each listener
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |