spring-framework / org.springframework.web.servlet.mvc.method.annotation / HttpEntityMethodProcessor

HttpEntityMethodProcessor

open class HttpEntityMethodProcessor : AbstractMessageConverterMethodProcessor

Resolves 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.

Author
Arjen Poutsma

Author
Rossen Stoyanchev

Author
Brian Clozel

Since
3.1

Constructors

<init>

HttpEntityMethodProcessor(converters: MutableList<HttpMessageConverter<*>>)

Basic constructor with converters only. Suitable for resolving HttpEntity. For handling ResponseEntity consider also providing a ContentNegotiationManager.

HttpEntityMethodProcessor(converters: MutableList<HttpMessageConverter<*>>, manager: ContentNegotiationManager)

Basic constructor with converters and ContentNegotiationManager. Suitable for resolving HttpEntity and handling ResponseEntity without Request~ or ResponseBodyAdvice.

HttpEntityMethodProcessor(converters: MutableList<HttpMessageConverter<*>>, requestResponseBodyAdvice: MutableList<Any>)

Complete constructor for resolving HttpEntity method arguments. For handling ResponseEntity consider also providing a ContentNegotiationManager.

HttpEntityMethodProcessor(converters: MutableList<HttpMessageConverter<*>>, manager: ContentNegotiationManager, requestResponseBodyAdvice: MutableList<Any>)

Complete constructor for resolving HttpEntity and handling ResponseEntity.

Functions

handleReturnValue

open fun handleReturnValue(returnValue: Any, returnType: MethodParameter, mavContainer: ModelAndViewContainer, webRequest: NativeWebRequest): Unit

resolveArgument

open fun resolveArgument(parameter: MethodParameter, mavContainer: ModelAndViewContainer, webRequest: NativeWebRequest, binderFactory: WebDataBinderFactory): Any

supportsParameter

open fun supportsParameter(parameter: MethodParameter): Boolean

supportsReturnType

open fun supportsReturnType(returnType: MethodParameter): Boolean