|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.thoughtworks.proxy.toys.future.Future<T>
public class Future<T>
Factory for proxy instances that run any method call concurrently and return the method result later. Any method call for the proxied object will be called asynchronously. However, the call itself will return immediately with another proxy for the result object. This is a hot swappable proxy that contains a null object until the asynchronously called method returns. Then the result proxy is hot swapped with the real result of the method.
Nested Class Summary | |
---|---|
static class |
Future.FutureBuild<T>
|
static class |
Future.FutureWith<T>
|
Method Summary | ||
---|---|---|
static
|
proxy(Class<T> primaryType)
Creates a proxy instance for asynchronous calls on a type. |
|
static
|
proxy(Class<T> primaryType,
Class<?>... types)
Creates a proxy instance for asynchronous calls on a type. |
|
static
|
proxy(T target)
Creates a proxy instance for asynchronous calls on an object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static <T> Future.FutureWith<T> proxy(Class<T> primaryType)
primaryType
- the type of the created proxy.
public static <T> Future.FutureWith<T> proxy(Class<T> primaryType, Class<?>... types)
primaryType
- the main type of the created proxy.types
- the other types of the created proxy.
public static <T> Future.FutureBuild<T> proxy(T target)
target
- the proxied object.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |