接口的使用
org.springframework.messaging.MessageHandler
使用MessageHandler的程序包 程序包 说明 org.springframework.messaging Support for working with messaging APIs and protocols.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.broker Provides a "simple" message broker implementation along with an abstract base class and other supporting types such as a registry for subscriptions.org.springframework.messaging.simp.config Configuration support for WebSocket messaging using higher level messaging protocols.org.springframework.messaging.simp.stomp Generic support for simple messaging protocols (like STOMP).org.springframework.messaging.simp.user Support for handling messages to "user" destinations (i.e. destinations that are unique to a user's sessions), primarily translating the destinations and then forwarding the updated message to the broker.org.springframework.messaging.support Provides implementations ofMessagealong with a MessageBuilder and MessageHeaderAccessor for building and working with messages and message headers, as well as variousMessageChannelimplementations and channel interceptor support.org.springframework.web.socket.messaging WebSocket integration for Spring's messaging module.org.springframework.messaging中MessageHandler的使用
参数类型为MessageHandler的org.springframework.messaging中的方法 修饰符和类型 方法 说明 booleanSubscribableChannel. subscribe(MessageHandler handler)Register a message handler.booleanSubscribableChannel. unsubscribe(MessageHandler handler)Un-register a message handler.org.springframework.messaging.handler.invocation中MessageHandler的使用
实现MessageHandler的org.springframework.messaging.handler.invocation中的类 修饰符和类型 类 说明 classAbstractMethodMessageHandler<T>Abstract base class for HandlerMethod-based message handling.org.springframework.messaging.simp.annotation.support中MessageHandler的使用
实现MessageHandler的org.springframework.messaging.simp.annotation.support中的类 修饰符和类型 类 说明 classSimpAnnotationMethodMessageHandlerA handler for messages delegating to@MessageMappingand@SubscribeMappingannotated methods.org.springframework.messaging.simp.broker中MessageHandler的使用
实现MessageHandler的org.springframework.messaging.simp.broker中的类 修饰符和类型 类 说明 classAbstractBrokerMessageHandlerAbstract base class for aMessageHandlerthat broker messages to registered subscribers.classSimpleBrokerMessageHandlerA "simple" message broker that recognizes the message types defined inSimpMessageType, keeps track of subscriptions with the help of aSubscriptionRegistryand sends messages to subscribers.org.springframework.messaging.simp.config中MessageHandler的使用
返回MessageHandler的org.springframework.messaging.simp.config中的方法 修饰符和类型 方法 说明 MessageHandlerAbstractMessageBrokerConfiguration. userRegistryMessageHandler()org.springframework.messaging.simp.stomp中MessageHandler的使用
实现MessageHandler的org.springframework.messaging.simp.stomp中的类 修饰符和类型 类 说明 classStompBrokerRelayMessageHandlerAMessageHandlerthat handles messages by forwarding them to a STOMP broker.返回变量类型为MessageHandler的类型的org.springframework.messaging.simp.stomp中的方法 修饰符和类型 方法 说明 Map<String,MessageHandler>StompBrokerRelayMessageHandler. getSystemSubscriptions()Return the configured map with subscriptions on the "system" connection.类型变量类型为MessageHandler的org.springframework.messaging.simp.stomp中的方法参数 修饰符和类型 方法 说明 voidStompBrokerRelayMessageHandler. setSystemSubscriptions(Map<String,MessageHandler> subscriptions)Configure one more destinations to subscribe to on the shared "system" connection along with MessageHandler's to handle received messages.org.springframework.messaging.simp.user中MessageHandler的使用
实现MessageHandler的org.springframework.messaging.simp.user中的类 修饰符和类型 类 说明 classUserDestinationMessageHandlerMessageHandlerwith support for "user" destinations.classUserRegistryMessageHandlerMessageHandlerthat handles user registry broadcasts from other application servers and periodically broadcasts the content of the local user registry.org.springframework.messaging.support中MessageHandler的使用
返回MessageHandler的org.springframework.messaging.support中的方法 修饰符和类型 方法 说明 MessageHandlerMessageHandlingRunnable. getMessageHandler()Return the MessageHandler that will be used to handle the message.返回变量类型为MessageHandler的类型的org.springframework.messaging.support中的方法 修饰符和类型 方法 说明 Set<MessageHandler>AbstractSubscribableChannel. getSubscribers()参数类型为MessageHandler的org.springframework.messaging.support中的方法 修饰符和类型 方法 说明 default voidExecutorChannelInterceptor. afterMessageHandled(Message<?> message, MessageChannel channel, MessageHandler handler, Exception ex)Invoked inside theRunnablesubmitted to the Executor after calling the target MessageHandler regardless of the outcome (i.e.default Message<?>ExecutorChannelInterceptor. beforeHandle(Message<?> message, MessageChannel channel, MessageHandler handler)Invoked inside theRunnablesubmitted to the Executor just before calling the target MessageHandler to handle the message.booleanAbstractSubscribableChannel. hasSubscription(MessageHandler handler)booleanAbstractSubscribableChannel. subscribe(MessageHandler handler)booleanAbstractSubscribableChannel. unsubscribe(MessageHandler handler)org.springframework.web.socket.messaging中MessageHandler的使用
实现MessageHandler的org.springframework.web.socket.messaging中的类 修饰符和类型 类 说明 classSubProtocolWebSocketHandlerAn implementation ofWebSocketHandlerthat delegates incoming WebSocket messages to aSubProtocolHandleralong with aMessageChannelto which the sub-protocol handler can send messages from WebSocket clients to the application.classWebSocketAnnotationMethodMessageHandlerA sub-class ofSimpAnnotationMethodMessageHandlerto provide support forControllerAdvicewith global@MessageExceptionHandlermethods.