HttpEntity and RequestEntity method argument values,
as well as return values of type HttpEntity, ResponseEntity,
ErrorResponse and ProblemDetail.
An HttpEntity return type has a specific purpose. Therefore, this
handler should be configured ahead of handlers that support any return
value type annotated with @ModelAttribute or @ResponseBody
to ensure they don't take over.
| Access | Constructor and Description |
|---|---|
| public | HttpEntityMethodProcessor(List<HttpMessageConverter<?>> converters)
Basic constructor with converters only. |
| public | HttpEntityMethodProcessor(List<HttpMessageConverter<?>> converters, ContentNegotiationManager manager)
Basic constructor with converters and |
| public | HttpEntityMethodProcessor(List<HttpMessageConverter<?>> converters, List<Object> requestResponseBodyAdvice)
Complete constructor for resolving |
| public | HttpEntityMethodProcessor(List<HttpMessageConverter<?>> converters, ContentNegotiationManager manager, List<Object> requestResponseBodyAdvice)
Complete constructor for resolving |
| Modifier and Type | Method and Description |
|---|---|
| private Type | |
| protected Class | getReturnValueType(Object returnValue, MethodParameter returnType)
Return the type of the value to be written to the response. |
| private List | |
| public void | handleReturnValue(Object
the value returned from the handler method returnValue, MethodParameter the type of the return value. This type must have
previously been passed to returnType, ModelAndViewContainer supportsReturnType which must
have returned true.the ModelAndViewContainer for the current request mavContainer, NativeWebRequest the current request webRequest)Implements org. Handle the given return value by adding attributes to the model and
setting a view or setting the
|
| private boolean | |
| public Object | resolveArgument(MethodParameter
the method parameter to resolve. This parameter must
have previously been passed to parameter, ModelAndViewContainer supportsParameter which must
have returned true.the ModelAndViewContainer for the current request mavContainer, NativeWebRequest the current request webRequest, WebDataBinderFactory a factory for creating binderFactory)WebDataBinder instancesImplements org. Resolves a method parameter into an argument value from a given request. |
| private void | |
| public boolean | supportsParameter(MethodParameter
the method parameter to check parameter)Implements org. Whether the given method parameter is supported by this resolver. |
| public boolean | supportsReturnType(MethodParameter
the method return type to check returnType)Implements org. Whether the given method return type is supported by this handler. |
| HttpEntityMethodProcessor | back to summary |
|---|---|
| public HttpEntityMethodProcessor(List<HttpMessageConverter<?>> converters) Basic constructor with converters only. Suitable for resolving
| |
| HttpEntityMethodProcessor | back to summary |
|---|---|
| public HttpEntityMethodProcessor(List<HttpMessageConverter<?>> converters, ContentNegotiationManager manager) Basic constructor with converters and | |
| HttpEntityMethodProcessor | back to summary |
|---|---|
| public HttpEntityMethodProcessor(List<HttpMessageConverter<?>> converters, List<Object> requestResponseBodyAdvice) Complete constructor for resolving
| |
| HttpEntityMethodProcessor | back to summary |
|---|---|
| public HttpEntityMethodProcessor(List<HttpMessageConverter<?>> converters, ContentNegotiationManager manager, List<Object> requestResponseBodyAdvice) Complete constructor for resolving | |
| getHttpEntityType | back to summary |
|---|---|
private Type getHttpEntityType(MethodParameter parameter)
| |
| getReturnValueType | back to summary |
|---|---|
| protected Class Return the type of the value to be written to the response. Typically this is
a simple check via getClass on the value but if the value is null, then the
return type needs to be examined possibly including generic type determination
(e.g.
| |
| getVaryRequestHeadersToAdd | back to summary |
|---|---|
| private List | |
| handleReturnValue | back to summary |
|---|---|
| public void handleReturnValue(Object returnValue, MethodParameter returnType, ModelAndViewContainer mavContainer, NativeWebRequest webRequest) throws Exception Implements org. Doc from org. Handle the given return value by adding attributes to the model and
setting a view or setting the
| |
| isResourceNotModified | back to summary |
|---|---|
| private boolean isResourceNotModified(ServletServerHttpRequest request, ServletServerHttpResponse response) | |
| resolveArgument | back to summary |
|---|---|
| public Object resolveArgument(MethodParameter parameter, ModelAndViewContainer mavContainer, NativeWebRequest webRequest, WebDataBinderFactory binderFactory) throws IOException, HttpMediaTypeNotSupportedException Implements org. Doc from org. Resolves a method parameter into an argument value from a given request.
A
| |
| saveFlashAttributes | back to summary |
|---|---|
| private void saveFlashAttributes(ModelAndViewContainer mav, NativeWebRequest request, String location) | |
| supportsParameter | back to summary |
|---|---|
| public boolean supportsParameter(MethodParameter parameter) Implements org. Doc from org. Whether the given method parameter is supported by this resolver.
| |
| supportsReturnType | back to summary |
|---|---|
| public boolean supportsReturnType(MethodParameter returnType) Implements org. Doc from org. Whether the given method return type is supported by this handler.
| |