open class AsyncResult<V : Any> : ListenableFuture<V>
A pass-through Future handle that can be used for method signatures which are declared with a Future return type for asynchronous execution.
As of Spring 4.1, this class implements ListenableFuture, not just plain java.util.concurrent.Future, along with the corresponding support in @Async processing.
As of Spring 4.2, this class also supports passing execution exceptions back to the caller.
Author
Juergen Hoeller
Author
Rossen Stoyanchev
Since
3.0
See Also
Async#forValue(Object)#forExecutionException(Throwable)
AsyncResult(value: V)
Create a new AsyncResult holder. |
open fun addCallback(callback: ListenableFutureCallback<in V>): Unitopen fun addCallback(successCallback: SuccessCallback<in V>, failureCallback: FailureCallback): Unit |
|
open fun cancel(mayInterruptIfRunning: Boolean): Boolean |
|
open fun completable(): CompletableFuture<V> |
|
open static fun <V : Any> forExecutionException(ex: Throwable): ListenableFuture<V>
Create a new async result which exposes the given exception as an ExecutionException from |
|
open static fun <V : Any> forValue(value: V): ListenableFuture<V>
Create a new async result which exposes the given value from |
|
open fun get(): Vopen fun get(timeout: Long, unit: TimeUnit): V |
|
open fun isCancelled(): Boolean |
|
open fun isDone(): Boolean |