|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.lsst.ccs.utilities.dispatch.SynchronousCommandDispatcher<T>
public class SynchronousCommandDispatcher<T>
Registers codes interested in receiving commands. Each code should know that it is handling an instance of SynchronousCommandFor and should behave accordingly.
The dispatchCommand methods execute this command sequentially on each "executant" object. The order of calls is not specified.
| Field Summary | |
|---|---|
protected java.util.concurrent.CopyOnWriteArrayList<T> |
list
|
| Constructor Summary | |
|---|---|
SynchronousCommandDispatcher()
|
|
| Method Summary | |
|---|---|
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 |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected java.util.concurrent.CopyOnWriteArrayList<T> list
| Constructor Detail |
|---|
public SynchronousCommandDispatcher()
| Method Detail |
|---|
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.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||