类 HandlerMethodReturnValueHandlerComposite
- java.lang.Object
- org.springframework.messaging.handler.invocation.reactive.HandlerMethodReturnValueHandlerComposite
- 所有已实现的接口:
HandlerMethodReturnValueHandler
public class HandlerMethodReturnValueHandlerComposite extends Object implements HandlerMethodReturnValueHandler
A HandlerMethodReturnValueHandler that wraps and delegates to others.- 从以下版本开始:
- 5.2
- 作者:
- Rossen Stoyanchev
字段概要
从接口继承的字段 org.springframework.messaging.handler.invocation.reactive.HandlerMethodReturnValueHandler
DATA_BUFFER_FACTORY_HEADER
构造器概要
构造器 构造器 说明 HandlerMethodReturnValueHandlerComposite()
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 HandlerMethodReturnValueHandlerComposite
addHandler(HandlerMethodReturnValueHandler returnValueHandler)
Add the givenHandlerMethodReturnValueHandler
.HandlerMethodReturnValueHandlerComposite
addHandlers(List<? extends HandlerMethodReturnValueHandler> handlers)
Add the givenHandlerMethodReturnValueHandlers
.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.
构造器详细资料
HandlerMethodReturnValueHandlerComposite
public HandlerMethodReturnValueHandlerComposite()
方法详细资料
getReturnValueHandlers
public List<HandlerMethodReturnValueHandler> getReturnValueHandlers()
Return a read-only list with the configured handlers.
clear
public void clear()
Clear the list of configured handlers.
addHandler
public HandlerMethodReturnValueHandlerComposite addHandler(HandlerMethodReturnValueHandler returnValueHandler)
Add the givenHandlerMethodReturnValueHandler
.
addHandlers
public HandlerMethodReturnValueHandlerComposite addHandlers(@Nullable List<? extends HandlerMethodReturnValueHandler> handlers)
Add the givenHandlerMethodReturnValueHandlers
.
supportsReturnType
public boolean supportsReturnType(MethodParameter returnType)
从接口复制的说明:HandlerMethodReturnValueHandler
Whether the given method return type is supported by this handler.- 指定者:
supportsReturnType
在接口中HandlerMethodReturnValueHandler
- 参数:
returnType
- the method return type to check- 返回:
true
if this handler supports the supplied return type;false
otherwise
handleReturnValue
public reactor.core.publisher.Mono<Void> handleReturnValue(@Nullable Object returnValue, MethodParameter returnType, Message<?> message)
从接口复制的说明:HandlerMethodReturnValueHandler
Handle the given return value.- 指定者:
handleReturnValue
在接口中HandlerMethodReturnValueHandler
- 参数:
returnValue
- the value returned from the handler methodreturnType
- the type of the return value. This type must have previously been passed toHandlerMethodReturnValueHandler.supportsReturnType(MethodParameter)
and it must have returnedtrue
.- 返回:
Mono<Void>
to indicate when handling is complete.