Class WebSocketMessageBrokerConfigurationSupport
java.lang.Object
org.springframework.messaging.simp.config.AbstractMessageBrokerConfiguration
org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurationSupport
- All Implemented Interfaces:
Aware
,ApplicationContextAware
- Direct Known Subclasses:
DelegatingWebSocketMessageBrokerConfiguration
public abstract class WebSocketMessageBrokerConfigurationSupport
extends AbstractMessageBrokerConfiguration
Extends
AbstractMessageBrokerConfiguration
and adds configuration for
receiving and responding to STOMP messages from WebSocket clients.
Typically used in conjunction with
@EnableWebSocketMessageBroker
but can
also be extended directly.
- Since:
- 4.0
- Author:
- Rossen Stoyanchev, Artem Bilan, Sebastien Deleuze
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
protected SimpAnnotationMethodMessageHandler
createAnnotationMethodMessageHandler
(AbstractSubscribableChannel clientInboundChannel, AbstractSubscribableChannel clientOutboundChannel, SimpMessagingTemplate brokerMessagingTemplate) Protected method for plugging in a custom subclass ofSimpAnnotationMethodMessageHandler
.protected MappingJackson2MessageConverter
protected SimpUserRegistry
createLocalUserRegistry
(Integer order) Create the user registry that provides access to local users.protected WebSocketHandler
decorateWebSocketHandler
(WebSocketHandler handler) protected final WebSocketTransportRegistration
protected abstract void
registerStompEndpoints
(StompEndpointRegistry registry) stompWebSocketHandlerMapping
(WebSocketHandler subProtocolWebSocketHandler, TaskScheduler messageBrokerTaskScheduler) subProtocolWebSocketHandler
(AbstractSubscribableChannel clientInboundChannel, AbstractSubscribableChannel clientOutboundChannel) webSocketMessageBrokerStats
(AbstractBrokerMessageHandler stompBrokerRelayMessageHandler, WebSocketHandler subProtocolWebSocketHandler, TaskExecutor inboundExecutor, TaskExecutor outboundExecutor, TaskScheduler scheduler) static CustomScopeConfigurer
Methods inherited from class org.springframework.messaging.simp.config.AbstractMessageBrokerConfiguration
addArgumentResolvers, addReturnValueHandlers, brokerChannel, brokerChannelExecutor, brokerMessageConverter, brokerMessagingTemplate, clientInboundChannel, clientInboundChannelExecutor, clientOutboundChannel, clientOutboundChannelExecutor, configureClientInboundChannel, configureClientOutboundChannel, configureMessageBroker, configureMessageConverters, getApplicationContext, getBrokerRegistry, getClientInboundChannelRegistration, getClientOutboundChannelRegistration, getPathMatcher, getValidator, messageBrokerTaskScheduler, setApplicationContext, simpAnnotationMethodMessageHandler, simpleBrokerMessageHandler, simpValidator, stompBrokerRelayMessageHandler, userDestinationMessageHandler, userDestinationResolver, userRegistry, userRegistryMessageHandler
-
Constructor Details
-
WebSocketMessageBrokerConfigurationSupport
public WebSocketMessageBrokerConfigurationSupport()
-
-
Method Details
-
createAnnotationMethodMessageHandler
protected SimpAnnotationMethodMessageHandler createAnnotationMethodMessageHandler(AbstractSubscribableChannel clientInboundChannel, AbstractSubscribableChannel clientOutboundChannel, SimpMessagingTemplate brokerMessagingTemplate) Description copied from class:AbstractMessageBrokerConfiguration
Protected method for plugging in a custom subclass ofSimpAnnotationMethodMessageHandler
.- Overrides:
createAnnotationMethodMessageHandler
in classAbstractMessageBrokerConfiguration
-
createLocalUserRegistry
Description copied from class:AbstractMessageBrokerConfiguration
Create the user registry that provides access to local users.- Specified by:
createLocalUserRegistry
in classAbstractMessageBrokerConfiguration
- Parameters:
order
- the order to use as aSmartApplicationListener
.
-
stompWebSocketHandlerMapping
@Bean public HandlerMapping stompWebSocketHandlerMapping(WebSocketHandler subProtocolWebSocketHandler, TaskScheduler messageBrokerTaskScheduler) -
subProtocolWebSocketHandler
@Bean public WebSocketHandler subProtocolWebSocketHandler(AbstractSubscribableChannel clientInboundChannel, AbstractSubscribableChannel clientOutboundChannel) -
decorateWebSocketHandler
-
getTransportRegistration
-
configureWebSocketTransport
-
registerStompEndpoints
-
webSocketScopeConfigurer
-
webSocketMessageBrokerStats
@Bean public WebSocketMessageBrokerStats webSocketMessageBrokerStats(@Nullable AbstractBrokerMessageHandler stompBrokerRelayMessageHandler, WebSocketHandler subProtocolWebSocketHandler, @Qualifier("clientInboundChannelExecutor") TaskExecutor inboundExecutor, @Qualifier("clientOutboundChannelExecutor") TaskExecutor outboundExecutor, @Qualifier("messageBrokerTaskScheduler") TaskScheduler scheduler) -
createJacksonConverter
- Overrides:
createJacksonConverter
in classAbstractMessageBrokerConfiguration
-