public class ResourceProcessorHandlerMethodReturnValueHandler
extends java.lang.Object
implements org.springframework.web.method.support.HandlerMethodReturnValueHandler
HandlerMethodReturnValueHandler to post-process the objects returned from controller methods using the
configured ResourceProcessors.| Constructor and Description |
|---|
ResourceProcessorHandlerMethodReturnValueHandler(org.springframework.web.method.support.HandlerMethodReturnValueHandler delegate,
java.util.List<org.springframework.hateoas.ResourceProcessor<?>> processors)
Creates a new
ResourceProcessorHandlerMethodReturnValueHandler using the given delegate to eventually
delegate calls to handleReturnValue(Object, MethodParameter, ModelAndViewContainer, NativeWebRequest) to. |
| Modifier and Type | Method and Description |
|---|---|
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) |
boolean |
supportsReturnType(org.springframework.core.MethodParameter returnType) |
public ResourceProcessorHandlerMethodReturnValueHandler(org.springframework.web.method.support.HandlerMethodReturnValueHandler delegate,
java.util.List<org.springframework.hateoas.ResourceProcessor<?>> processors)
ResourceProcessorHandlerMethodReturnValueHandler using the given delegate to eventually
delegate calls to handleReturnValue(Object, MethodParameter, ModelAndViewContainer, NativeWebRequest) to.
Will consider the given ResourceProcessor to post-process the controller methods return value to before
invoking the delegate.delegate - the HandlerMethodReturnValueHandler to evenually delegate calls to, must not be
null.processors - the ResourceProcessors to be considered, must not be null.public boolean supportsReturnType(org.springframework.core.MethodParameter returnType)
supportsReturnType in interface org.springframework.web.method.support.HandlerMethodReturnValueHandlerpublic 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
handleReturnValue in interface org.springframework.web.method.support.HandlerMethodReturnValueHandlerjava.lang.Exception