Class HandlerResult
java.lang.Object
org.springframework.web.reactive.HandlerResult
Represent the result of the invocation of a handler or a handler method.
- Since:
- 5.0
- Author:
- Rossen Stoyanchev
- 
Constructor SummaryConstructorsConstructorDescriptionHandlerResult(Object handler, @Nullable Object returnValue, MethodParameter returnType) Create a newHandlerResult.HandlerResult(Object handler, @Nullable Object returnValue, MethodParameter returnType, @Nullable BindingContext context) Create a newHandlerResult.
- 
Method SummaryModifier and TypeMethodDescriptionReturn the BindingContext used for request handling.Return theconfiguredexception handler.Return the handler that handled the request.getModel()Return the model used for request handling.Return the type of the value returned from the handler -- for example, the return type declared on a controller method's signature.Return theMethodParameterfrom whichreturnTypewas created.Return the value returned from the handler, if any.setExceptionHandler(DispatchExceptionHandler exceptionHandler) HandlerAdapterclasses can set this to have their exception handling mechanism applied to response rendering and to deferred exceptions when invoking a handler with an asynchronous return value.
- 
Constructor Details- 
HandlerResultCreate a newHandlerResult.- Parameters:
- handler- the handler that handled the request
- returnValue- the return value from the handler possibly- null
- returnType- the return value type
 
- 
HandlerResultpublic HandlerResult(Object handler, @Nullable Object returnValue, MethodParameter returnType, @Nullable BindingContext context) Create a newHandlerResult.- Parameters:
- handler- the handler that handled the request
- returnValue- the return value from the handler possibly- null
- returnType- the return value type
- context- the binding context used for request handling
 
 
- 
- 
Method Details- 
getHandlerReturn the handler that handled the request.
- 
getReturnValue
- 
getReturnTypeReturn the type of the value returned from the handler -- for example, the return type declared on a controller method's signature. Also seegetReturnTypeSource()to obtain the underlyingMethodParameterfor the return type.
- 
getReturnTypeSourceReturn theMethodParameterfrom whichreturnTypewas created.
- 
getBindingContextReturn the BindingContext used for request handling.
- 
getModelReturn the model used for request handling. This is a shortcut forgetBindingContext().getModel().
- 
setExceptionHandlerHandlerAdapterclasses can set this to have their exception handling mechanism applied to response rendering and to deferred exceptions when invoking a handler with an asynchronous return value.- Parameters:
- exceptionHandler- the exception handler to use
- Since:
- 6.0
 
- 
getExceptionHandlerReturn theconfiguredexception handler.- Since:
- 6.0
 
 
-