public class HandlerMethodReturnValueHandlerComposite extends Object implements HandlerMethodReturnValueHandler
| Modifier and Type | Field and Description |
|---|---|
protected Log |
logger |
DATA_BUFFER_FACTORY_HEADER| Constructor and Description |
|---|
HandlerMethodReturnValueHandlerComposite() |
| Modifier and Type | Method and Description |
|---|---|
HandlerMethodReturnValueHandlerComposite |
addHandler(HandlerMethodReturnValueHandler returnValueHandler)
Add the given
HandlerMethodReturnValueHandler. |
HandlerMethodReturnValueHandlerComposite |
addHandlers(List<? extends HandlerMethodReturnValueHandler> handlers)
Add the given
HandlerMethodReturnValueHandlers. |
void |
clear()
Clear the list of configured handlers.
|
List<HandlerMethodReturnValueHandler> |
getReturnValueHandlers()
Return a read-only list with the configured handlers.
|
reactor.core.publisher.Mono<Void> |
handleReturnValue(Object returnValue,
MethodParameter returnType,
Message<?> message)
Handle the given return value.
|
boolean |
supportsReturnType(MethodParameter returnType)
Whether the given method return type is
supported by this handler.
|
protected final Log logger
public HandlerMethodReturnValueHandlerComposite()
public List<HandlerMethodReturnValueHandler> getReturnValueHandlers()
public void clear()
public HandlerMethodReturnValueHandlerComposite addHandler(HandlerMethodReturnValueHandler returnValueHandler)
HandlerMethodReturnValueHandler.public HandlerMethodReturnValueHandlerComposite addHandlers(@Nullable List<? extends HandlerMethodReturnValueHandler> handlers)
HandlerMethodReturnValueHandlers.public boolean supportsReturnType(MethodParameter returnType)
HandlerMethodReturnValueHandlersupportsReturnType in interface HandlerMethodReturnValueHandlerreturnType - the method return type to checktrue if this handler supports the supplied return type;
false otherwisepublic reactor.core.publisher.Mono<Void> handleReturnValue(@Nullable Object returnValue, MethodParameter returnType, Message<?> message)
HandlerMethodReturnValueHandlerhandleReturnValue in interface HandlerMethodReturnValueHandlerreturnValue - the value returned from the handler methodreturnType - the type of the return value. This type must have previously
been passed to HandlerMethodReturnValueHandler.supportsReturnType(MethodParameter)
and it must have returned true.Mono<Void> to indicate when handling is complete.