public interface AsyncHandlerMethodReturnValueHandler extends HandlerMethodReturnValueHandler
Note: implementing this contract is not required but it
should be implemented when the handler needs to be prioritized ahead of others.
For example custom (async) handlers, by default ordered after built-in
handlers, should take precedence over @ResponseBody
or
@ModelAttribute
handling, which should occur once the async value is
ready. By contrast, built-in (async) handlers are already ordered ahead of
sync handlers.
Modifier and Type | Method and Description |
---|---|
boolean |
isAsyncReturnValue(Object returnValue,
MethodParameter returnType)
Whether the given return value represents asynchronous computation.
|
handleReturnValue, supportsReturnType
boolean isAsyncReturnValue(@Nullable Object returnValue, MethodParameter returnType)
returnValue
- the value returned from the handler methodreturnType
- the return typetrue
if the return value type represents an async value