public class SynchronousCommandDispatcher<T> extends Object
The dispatchCommand methods execute this command sequentially on each "executant" object. The order of calls is not specified.
| Modifier and Type | Field and Description |
|---|---|
protected CopyOnWriteArrayList<T> |
list |
| Constructor and Description |
|---|
SynchronousCommandDispatcher() |
| Modifier and Type | Method and Description |
|---|---|
void |
addExecutant(T executant)
Registers a code ready to receive "synchronous" commands
|
void |
dispatchCommand(SynchronousCommandFor<? super T> command)
Sends a command to all registered codes ready to handle it.
|
void |
removeExecutant(T executant)
Remove the code from the listeners list
|
protected CopyOnWriteArrayList<T> list
public void addExecutant(T executant)
executant - public void removeExecutant(T executant)
executant - public void dispatchCommand(SynchronousCommandFor<? super T> command)
If an exception is fired it is catched and logged. proper handling of Exception should be performed by the implementing commands.
Copyright © 2015 LSST. All rights reserved.