接口的使用
org.springframework.messaging.handler.invocation.HandlerMethodReturnValueHandler
使用HandlerMethodReturnValueHandler的程序包 程序包 说明 org.springframework.messaging.handler.invocation Common infrastructure for invoking message handler methods.org.springframework.messaging.simp.annotation.support Support classes for handling messages from simple messaging protocols (like STOMP).org.springframework.messaging.simp.config Configuration support for WebSocket messaging using higher level messaging protocols.org.springframework.web.socket.config.annotation Support for annotation-based WebSocket setup in configuration classes.org.springframework.messaging.handler.invocation中HandlerMethodReturnValueHandler的使用
org.springframework.messaging.handler.invocation中HandlerMethodReturnValueHandler的子接口 修饰符和类型 接口 说明 interface
AsyncHandlerMethodReturnValueHandler
An extension ofHandlerMethodReturnValueHandler
for handling async, Future-like return value types that support success and error callbacks.实现HandlerMethodReturnValueHandler的org.springframework.messaging.handler.invocation中的类 修饰符和类型 类 说明 class
AbstractAsyncReturnValueHandler
Convenient base class forAsyncHandlerMethodReturnValueHandler
implementations that support only asynchronous (Future-like) return values and merely serve as adapters of such types to Spring'sListenableFuture
.class
CompletableFutureReturnValueHandler
Support forCompletableFuture
(and as of 4.3.7 alsoCompletionStage
) as a return value type.class
HandlerMethodReturnValueHandlerComposite
A HandlerMethodReturnValueHandler that wraps and delegates to others.class
ListenableFutureReturnValueHandler
Support forListenableFuture
as a return value type.class
ReactiveReturnValueHandler
Support for single-value reactive types (likeMono
orSingle
) as a return value type.返回变量类型为HandlerMethodReturnValueHandler的类型的org.springframework.messaging.handler.invocation中的方法 修饰符和类型 方法 说明 List<HandlerMethodReturnValueHandler>
AbstractMethodMessageHandler. getCustomReturnValueHandlers()
Return the configured custom return value handlers, if any.List<HandlerMethodReturnValueHandler>
AbstractMethodMessageHandler. getReturnValueHandlers()
Return the complete list of return value handlers.List<HandlerMethodReturnValueHandler>
HandlerMethodReturnValueHandlerComposite. getReturnValueHandlers()
Return a read-only list with the configured handlers.protected abstract List<? extends HandlerMethodReturnValueHandler>
AbstractMethodMessageHandler. initReturnValueHandlers()
Return the list of return value handlers to use.参数类型为HandlerMethodReturnValueHandler的org.springframework.messaging.handler.invocation中的方法 修饰符和类型 方法 说明 HandlerMethodReturnValueHandlerComposite
HandlerMethodReturnValueHandlerComposite. addHandler(HandlerMethodReturnValueHandler returnValueHandler)
Add the givenHandlerMethodReturnValueHandler
.类型变量类型为HandlerMethodReturnValueHandler的org.springframework.messaging.handler.invocation中的方法参数 修饰符和类型 方法 说明 HandlerMethodReturnValueHandlerComposite
HandlerMethodReturnValueHandlerComposite. addHandlers(List<? extends HandlerMethodReturnValueHandler> handlers)
Add the givenHandlerMethodReturnValueHandlers
.void
AbstractMethodMessageHandler. setCustomReturnValueHandlers(List<HandlerMethodReturnValueHandler> customReturnValueHandlers)
Set the list of customHandlerMethodReturnValueHandler
s that will be used after return value handlers for known types.void
AbstractMethodMessageHandler. setReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers)
Configure the complete list of supported return value types, effectively overriding the ones configured by default.org.springframework.messaging.simp.annotation.support中HandlerMethodReturnValueHandler的使用
实现HandlerMethodReturnValueHandler的org.springframework.messaging.simp.annotation.support中的类 修饰符和类型 类 说明 class
SendToMethodReturnValueHandler
AHandlerMethodReturnValueHandler
for sending to destinations specified in aSendTo
orSendToUser
method-level annotations.class
SubscriptionMethodReturnValueHandler
HandlerMethodReturnValueHandler
for replying directly to a subscription.返回变量类型为HandlerMethodReturnValueHandler的类型的org.springframework.messaging.simp.annotation.support中的方法 修饰符和类型 方法 说明 protected List<? extends HandlerMethodReturnValueHandler>
SimpAnnotationMethodMessageHandler. initReturnValueHandlers()
org.springframework.messaging.simp.config中HandlerMethodReturnValueHandler的使用
类型变量类型为HandlerMethodReturnValueHandler的org.springframework.messaging.simp.config中的方法参数 修饰符和类型 方法 说明 protected void
AbstractMessageBrokerConfiguration. addReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers)
org.springframework.web.socket.config.annotation中HandlerMethodReturnValueHandler的使用
类型变量类型为HandlerMethodReturnValueHandler的org.springframework.web.socket.config.annotation中的方法参数 修饰符和类型 方法 说明 void
AbstractWebSocketMessageBrokerConfigurer. addReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers)
已过时。protected void
DelegatingWebSocketMessageBrokerConfiguration. addReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers)
default void
WebSocketMessageBrokerConfigurer. addReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers)
Add handlers to support custom controller method return value types.