T - the type of resultpublic abstract class AsyncResult<T> extends java.lang.Object implements java.util.concurrent.Future<T>, ClosureCommand<T>
Future. Can be used for method signatures
which are declared with a Future return type for asynchronous execution.
Provides abstract invoke() method to wrap some logic for an asynchronous call.| Constructor and Description |
|---|
AsyncResult() |
public boolean cancel(boolean mayInterruptIfRunning)
throws java.lang.UnsupportedOperationException
cancel in interface java.util.concurrent.Future<T>java.lang.UnsupportedOperationExceptionpublic boolean isCancelled()
throws java.lang.UnsupportedOperationException
isCancelled in interface java.util.concurrent.Future<T>java.lang.UnsupportedOperationExceptionpublic boolean isDone()
throws java.lang.UnsupportedOperationException
isDone in interface java.util.concurrent.Future<T>java.lang.UnsupportedOperationExceptionpublic T get() throws java.lang.UnsupportedOperationException
get in interface java.util.concurrent.Future<T>java.lang.UnsupportedOperationExceptionpublic T get(long timeout, java.util.concurrent.TimeUnit unit) throws java.lang.UnsupportedOperationException
get in interface java.util.concurrent.Future<T>java.lang.UnsupportedOperationExceptionpublic abstract T invoke()
invoke in interface ClosureCommand<T>