public class MultiplexInvocationHandler<T> extends Object implements InvocationHandler
Constructor and Description |
---|
MultiplexInvocationHandler(T[] targets)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
T |
createMultiplexer(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.
|
Object |
invoke(Object proxy,
Method method,
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)
targets
- target instancespublic T[] getTargets()
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
invoke
in interface InvocationHandler
Throwable
Copyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.