|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.thoughtworks.proxy.toys.multicast.MulticastingInvoker<T>
public class MulticastingInvoker<T>
A Invoker
implementation that multicasts calls to multiple targets. Proxies generated by this class will
forward all method invocations to an array of underlying objects. The behavior is recursive, so return values will
also be multicasting objects.
Constructor Summary | |
---|---|
MulticastingInvoker(Class<?>[] type,
ProxyFactory proxyFactory,
Object[] targets)
Construct a MulticastingInvoker. |
Method Summary | |
---|---|
Object |
invoke(Object proxy,
Method method,
Object[] args)
Invocation of a method of the proxied object. |
T |
proxy()
Create a proxy for this Invoker. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MulticastingInvoker(Class<?>[] type, ProxyFactory proxyFactory, Object[] targets)
type
- the implemented typesproxyFactory
- the ProxyFactory
to usetargets
- the target instances where the proxy delegates a callMethod Detail |
---|
public T proxy()
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable
Invoker
invoke
in interface Invoker
proxy
- the proxy instance.method
- the method to invoke.args
- the arguments of the method.
Throwable
- if the invoked method has thrown.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |