public class HttpEntityMethodProcessor extends AbstractMessageConverterMethodProcessor
HttpEntity and RequestEntity method argument values
and also handles HttpEntity and ResponseEntity return values.
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.
allSupportedMediaTypes, logger, messageConverters| Constructor and Description |
|---|
HttpEntityMethodProcessor(java.util.List<org.springframework.http.converter.HttpMessageConverter<?>> messageConverters) |
HttpEntityMethodProcessor(java.util.List<org.springframework.http.converter.HttpMessageConverter<?>> messageConverters,
org.springframework.web.accept.ContentNegotiationManager contentNegotiationManager) |
HttpEntityMethodProcessor(java.util.List<org.springframework.http.converter.HttpMessageConverter<?>> messageConverters,
org.springframework.web.accept.ContentNegotiationManager contentNegotiationManager,
java.util.List<java.lang.Object> responseBodyAdvice) |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Class<?> |
getReturnValueType(java.lang.Object returnValue,
org.springframework.core.MethodParameter returnType)
Return the type of the value to be written to the response.
|
void |
handleReturnValue(java.lang.Object returnValue,
org.springframework.core.MethodParameter returnType,
org.springframework.web.method.support.ModelAndViewContainer mavContainer,
org.springframework.web.context.request.NativeWebRequest webRequest) |
java.lang.Object |
resolveArgument(org.springframework.core.MethodParameter parameter,
org.springframework.web.method.support.ModelAndViewContainer mavContainer,
org.springframework.web.context.request.NativeWebRequest webRequest,
org.springframework.web.bind.support.WebDataBinderFactory binderFactory) |
boolean |
supportsParameter(org.springframework.core.MethodParameter parameter) |
boolean |
supportsReturnType(org.springframework.core.MethodParameter returnType) |
createOutputMessage, getAdviceChain, getProducibleMediaTypes, writeWithMessageConverters, writeWithMessageConverterscreateInputMessage, readWithMessageConverters, readWithMessageConverterspublic HttpEntityMethodProcessor(java.util.List<org.springframework.http.converter.HttpMessageConverter<?>> messageConverters)
public HttpEntityMethodProcessor(java.util.List<org.springframework.http.converter.HttpMessageConverter<?>> messageConverters,
org.springframework.web.accept.ContentNegotiationManager contentNegotiationManager)
public HttpEntityMethodProcessor(java.util.List<org.springframework.http.converter.HttpMessageConverter<?>> messageConverters,
org.springframework.web.accept.ContentNegotiationManager contentNegotiationManager,
java.util.List<java.lang.Object> responseBodyAdvice)
public boolean supportsParameter(org.springframework.core.MethodParameter parameter)
public boolean supportsReturnType(org.springframework.core.MethodParameter returnType)
public java.lang.Object resolveArgument(org.springframework.core.MethodParameter parameter,
org.springframework.web.method.support.ModelAndViewContainer mavContainer,
org.springframework.web.context.request.NativeWebRequest webRequest,
org.springframework.web.bind.support.WebDataBinderFactory binderFactory)
throws java.io.IOException,
org.springframework.web.HttpMediaTypeNotSupportedException
java.io.IOExceptionorg.springframework.web.HttpMediaTypeNotSupportedExceptionpublic void handleReturnValue(java.lang.Object returnValue,
org.springframework.core.MethodParameter returnType,
org.springframework.web.method.support.ModelAndViewContainer mavContainer,
org.springframework.web.context.request.NativeWebRequest webRequest)
throws java.lang.Exception
java.lang.Exceptionprotected java.lang.Class<?> getReturnValueType(java.lang.Object returnValue,
org.springframework.core.MethodParameter returnType)
AbstractMessageConverterMethodProcessorResponseEntity<T>).getReturnValueType in class AbstractMessageConverterMethodProcessor