|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.lsst.ccs.utilities.dispatch.ParallelDispatchProxy<I>
public class ParallelDispatchProxy<I>
Instances of this class creates a dynamic proxy that parallely dispatches method call to registered agents implementing an interface type.
beware : if the implemented interface is itself a parameterized type no type control is exercised on these type parameters.
| Field Summary | |
|---|---|
protected java.util.concurrent.CopyOnWriteArrayList<java.lang.Object> |
list
|
protected java.util.concurrent.ExecutorService |
loop
|
protected I |
proxy
|
| Constructor Summary | |
|---|---|
ParallelDispatchProxy(java.lang.Class<I> interfaceType)
prepares a generator able to deliver a Proxy object able to dispatch method calls to registered agents. |
|
ParallelDispatchProxy(java.lang.Class<I> interfaceType,
java.lang.ClassLoader loader)
Same as previous but with a specified ClassLoader |
|
| Method Summary | ||
|---|---|---|
|
addExecutant(T executant)
Registers a code ready to receive "synchronous" commands |
|
I |
getProxy()
to be called once to get a dynamically generated proxy that will forward calls to registered agents. |
|
|
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<java.lang.Object> list
protected I proxy
protected java.util.concurrent.ExecutorService loop
| Constructor Detail |
|---|
public ParallelDispatchProxy(java.lang.Class<I> interfaceType)
interfaceType -
public ParallelDispatchProxy(java.lang.Class<I> interfaceType,
java.lang.ClassLoader loader)
interfaceType - loader - | Method Detail |
|---|
public <T extends I> void addExecutant(T executant)
executant - (should implement the interface)public <T extends I> void removeExecutant(T executant)
executant - public I getProxy()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||