java.lang.reflect.InvocationHandlerpublic class MultiplexInvocationHandler<T>
extends java.lang.Object
implements java.lang.reflect.InvocationHandler
| Constructor | Description |
|---|---|
MultiplexInvocationHandler(T[] targets) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
T |
createMultiplexer(java.lang.Class<T> clazz) |
Returns a new proxy instance which implements the given interface type,
and which uses this handler to execute its methods.
|
T[] |
getTargets() |
Returns the list of delegate implementations.
|
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args) |
Invokes a method by invoking the same method on each of this
handler's target instances.
|
void |
setTargets(T[] targets) |
Sets the list of delegate implementations.
|
public MultiplexInvocationHandler(T[] targets)
targets - target instancespublic void setTargets(T[] targets)
public T[] getTargets()
public java.lang.Object invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args)
throws java.lang.Throwable
invoke in interface java.lang.reflect.InvocationHandlerjava.lang.ThrowableCopyright © 2018 Central Laboratory of the Research Councils. All Rights Reserved.