public class SynchronousDispatchProxy<I> extends Object
beware : if the implemented interface is itself a parameterized type no type control is exercised on these type parameters.
| Modifier and Type | Field and Description |
|---|---|
protected CopyOnWriteArrayList<Object> |
list |
protected I |
proxy |
| Constructor and Description |
|---|
SynchronousDispatchProxy(Class<I> interfaceType)
prepares a generator able to deliver a Proxy object able to dispatch method calls to registered agents.
|
SynchronousDispatchProxy(Class<I> interfaceType,
ClassLoader loader)
Same as previous but with a specified ClassLoader
|
| Modifier and Type | Method and Description |
|---|---|
<T extends I> |
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.
|
<T extends I> |
removeExecutant(T executant)
Remove the code from the listeners list
|
protected CopyOnWriteArrayList<Object> list
protected I proxy
public SynchronousDispatchProxy(Class<I> interfaceType)
interfaceType - public SynchronousDispatchProxy(Class<I> interfaceType, ClassLoader loader)
interfaceType - loader - 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()
Copyright © 2014 LSST. All Rights Reserved.