HandlerMethodReturnValueHandler for handling async,
Future-like return value types that support success and error callbacks.
Essentially anything that can be adapted to a
ListenableFuture.
Implementations should consider extending the convenient base class
AbstractAsyncReturnValueHandler.
AbstractAsyncReturnValueHandler
| Modifier and Type | Method and Description |
|---|---|
| public boolean | Returns: true if the return value type represents an async valuethe value returned from the handler method returnValue, MethodParameter the type of the return value returnType)Whether the return value represents an asynchronous, Future-like type with success and error callbacks. |
| public CompletableFuture | Returns: the resulting CompletableFuture, ornull in which case
no further handling will be performedthe value returned from the handler method returnValue, MethodParameter the type of the return value returnType)Adapt the asynchronous return value to a |
| public default ListenableFuture | Returns: the resulting ListenableFuture, ornull in which case
no further handling will be performedthe value returned from the handler method returnValue, MethodParameter the type of the return value returnType)
Deprecated
since 6.0. as of 6.0, in favor of
toCompletableFuture(Object, MethodParameter)
Adapt the asynchronous return value to a
|
| isAsyncReturnValue | back to summary |
|---|---|
| public boolean isAsyncReturnValue(Object returnValue, MethodParameter returnType) Whether the return value represents an asynchronous, Future-like type
with success and error callbacks. If this method returns Note this method will only be invoked after
| |
| toCompletableFuture | back to summary |
|---|---|
| public CompletableFuture Adapt the asynchronous return value to a Return value handling will then continue when the CompletableFuture is completed with either success or error. Note this method will only be invoked after
| |
| toListenableFuture | back to summary |
|---|---|
| public default ListenableFuture Adapt the asynchronous return value to a
Implementations should consider returning an instance of
Note this method will only be invoked after
| |