Class AsyncResult<V>
java.lang.Object
org.springframework.scheduling.annotation.AsyncResult<V>
- Type Parameters:
V
- the value type
- All Implemented Interfaces:
Future<V>
Deprecated.
A pass-through
Future
handle that can be used for method signatures
which are declared with a Future
return type for asynchronous execution.- Since:
- 3.0
- Author:
- Juergen Hoeller, Rossen Stoyanchev
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
cancel
(boolean mayInterruptIfRunning) Deprecated.static <V> Future<V>
Deprecated.Create a new async result which exposes the given exception as anExecutionException
fromFuture.get()
.static <V> Future<V>
forValue
(V value) Deprecated.Create a new async result which exposes the given value fromFuture.get()
.get()
Deprecated.Deprecated.boolean
Deprecated.boolean
isDone()
Deprecated.
-
Constructor Details
-
AsyncResult
Deprecated.Create a new AsyncResult holder.- Parameters:
value
- the value to pass through
-
-
Method Details
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) Deprecated. -
isCancelled
public boolean isCancelled()Deprecated.- Specified by:
isCancelled
in interfaceFuture<V>
-
isDone
public boolean isDone()Deprecated. -
get
Deprecated.- Specified by:
get
in interfaceFuture<V>
- Throws:
ExecutionException
-
get
Deprecated.- Specified by:
get
in interfaceFuture<V>
- Throws:
ExecutionException
-
forValue
Deprecated.Create a new async result which exposes the given value fromFuture.get()
.- Parameters:
value
- the value to expose- Since:
- 4.2
- See Also:
-
forExecutionException
Deprecated.Create a new async result which exposes the given exception as anExecutionException
fromFuture.get()
.- Parameters:
ex
- the exception to expose (either an pre-builtExecutionException
or a cause to be wrapped in anExecutionException
)- Since:
- 4.2
- See Also:
-
CompletableFuture