Interface AsyncHandlerMethodReturnValueHandler
- All Superinterfaces:
HandlerMethodReturnValueHandler
A return value handler that supports async types. Such return value types
need to be handled with priority so the async value can be "unwrapped".
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.
- Since:
- 4.2
- Author:
- Rossen Stoyanchev
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isAsyncReturnValue
(Object returnValue, MethodParameter returnType) Whether the given return value represents asynchronous computation.Methods inherited from interface org.springframework.web.method.support.HandlerMethodReturnValueHandler
handleReturnValue, supportsReturnType
-
Method Details
-
isAsyncReturnValue
Whether the given return value represents asynchronous computation.- Parameters:
returnValue
- the value returned from the handler methodreturnType
- the return type- Returns:
true
if the return value type represents an async value
-