public class FutureInvoker extends Object implements Invoker
Invoker
that implements transparent asynchronous
method calls. The invoked method will return immediately with a result that can be
hot swapped. This result proxy contains first a null object and will automatically replaced later on when the asynchronous method call
returns the correct result.Constructor and Description |
---|
FutureInvoker(Object target,
ProxyFactory proxyFactory,
ExecutorService executor)
Construct the invoker.
|
Modifier and Type | Method and Description |
---|---|
Object |
invoke(Object proxy,
Method method,
Object[] args)
Invocation of a method of the proxied object.
|
public FutureInvoker(Object target, ProxyFactory proxyFactory, ExecutorService executor)
target
- the instance that will have its methods called asynchronouslyproxyFactory
- the proxy factory used to create the proxy for the target instance
and all return types of the called methodsexecutor
- the executor used to call the method asynchronouslyCopyright © 2005–2024 Codehaus. All rights reserved.