Top Description Fields Constructors Methods
org.springframework.web.socket.config.annotation

public abstract Class WebSocketMessageBrokerConfigurationSupport

extends AbstractMessageBrokerConfiguration
Class Inheritance
Known Direct Subclasses
org.springframework.web.socket.config.annotation.DelegatingWebSocketMessageBrokerConfiguration
Imports
org.springframework.beans.factory.annotation.Qualifier, org.springframework.beans.factory.config.CustomScopeConfigurer, org.springframework.context.ApplicationContext, org.springframework.context.annotation.Bean, org.springframework.core.task.TaskExecutor, org.springframework.http.converter.json.Jackson2ObjectMapperBuilder, org.springframework.lang.Nullable, org.springframework.messaging.converter.MappingJackson2MessageConverter, org.springframework.messaging.simp.SimpMessagingTemplate, .SimpSessionScope, org.springframework.messaging.simp.annotation.support.SimpAnnotationMethodMessageHandler, org.springframework.messaging.simp.broker.AbstractBrokerMessageHandler, .OrderedMessageChannelDecorator, org.springframework.messaging.simp.config.AbstractMessageBrokerConfiguration, org.springframework.messaging.simp.stomp.StompBrokerRelayMessageHandler, org.springframework.messaging.simp.user.SimpUserRegistry, org.springframework.messaging.support.AbstractSubscribableChannel, org.springframework.scheduling.TaskScheduler, org.springframework.web.servlet.HandlerMapping, org.springframework.web.servlet.handler.AbstractHandlerMapping, org.springframework.web.socket.WebSocketHandler, org.springframework.web.socket.config.WebSocketMessageBrokerStats, org.springframework.web.socket.handler.WebSocketHandlerDecoratorFactory, org.springframework.web.socket.messaging.DefaultSimpUserRegistry, .SubProtocolWebSocketHandler, .WebSocketAnnotationMethodMessageHandler, org.springframework.web.socket.server.support.WebSocketHandlerMapping

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.

Authors
Rossen Stoyanchev, Artem Bilan, Sebastien Deleuze
Since
4.0

Field Summary

Modifier and TypeField and Description
private WebSocketTransportRegistration

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
protected SimpAnnotationMethodMessageHandler
protected MappingJackson2MessageConverter
protected SimpUserRegistry
createLocalUserRegistry(Integer
the order to use as a SmartApplicationListener.
order
)

Implements abstract org.springframework.messaging.simp.config.AbstractMessageBrokerConfiguration.createLocalUserRegistry.

Create the user registry that provides access to local users.

protected WebSocketHandler
protected final WebSocketTransportRegistration
protected abstract void
public HandlerMapping
stompWebSocketHandlerMapping(WebSocketHandler subProtocolWebSocketHandler, TaskScheduler messageBrokerTaskScheduler, AbstractSubscribableChannel clientInboundChannel)

public WebSocketHandler
public WebSocketMessageBrokerStats
webSocketMessageBrokerStats(AbstractBrokerMessageHandler stompBrokerRelayMessageHandler, WebSocketHandler subProtocolWebSocketHandler, TaskExecutor inboundExecutor, TaskExecutor outboundExecutor, TaskScheduler scheduler)

public static CustomScopeConfigurer
Inherited from org.springframework.messaging.simp.config.AbstractMessageBrokerConfiguration:
addArgumentResolversaddReturnValueHandlersbrokerChannelbrokerChannelExecutorbrokerMessageConverterbrokerMessagingTemplateclientInboundChannelclientInboundChannelExecutorclientOutboundChannelclientOutboundChannelExecutorconfigureClientInboundChannelconfigureClientOutboundChannelconfigureMessageBrokerconfigureMessageConvertersgetApplicationContextgetBrokerRegistrygetClientInboundChannelRegistrationgetClientOutboundChannelRegistrationgetPathMatchergetPhasegetValidatorinitPhasemessageBrokerTaskSchedulersetApplicationContextsimpAnnotationMethodMessageHandlersimpleBrokerMessageHandlersimpValidatorstompBrokerRelayMessageHandleruserDestinationMessageHandleruserDestinationResolveruserRegistryuserRegistryMessageHandler

Field Detail

transportRegistrationback to summary
private WebSocketTransportRegistration transportRegistration
Annotations
@Nullable

Constructor Detail

WebSocketMessageBrokerConfigurationSupportback to summary
public WebSocketMessageBrokerConfigurationSupport()

Method Detail

configureWebSocketTransportback to summary
protected void configureWebSocketTransport(WebSocketTransportRegistration registry)
createAnnotationMethodMessageHandlerback to summary
protected SimpAnnotationMethodMessageHandler createAnnotationMethodMessageHandler(AbstractSubscribableChannel clientInboundChannel, AbstractSubscribableChannel clientOutboundChannel, SimpMessagingTemplate brokerMessagingTemplate)

Overrides org.springframework.messaging.simp.config.AbstractMessageBrokerConfiguration.createAnnotationMethodMessageHandler.

Doc from org.springframework.messaging.simp.config.AbstractMessageBrokerConfiguration.createAnnotationMethodMessageHandler.

Protected method for plugging in a custom subclass of SimpAnnotationMethodMessageHandler.

Annotations
@Override
createJacksonConverterback to summary
protected MappingJackson2MessageConverter createJacksonConverter()

Overrides org.springframework.messaging.simp.config.AbstractMessageBrokerConfiguration.createJacksonConverter.

Annotations
@Override
createLocalUserRegistryback to summary
protected SimpUserRegistry createLocalUserRegistry(Integer order)

Implements abstract org.springframework.messaging.simp.config.AbstractMessageBrokerConfiguration.createLocalUserRegistry.

Doc from org.springframework.messaging.simp.config.AbstractMessageBrokerConfiguration.createLocalUserRegistry.

Create the user registry that provides access to local users.

Parameters
order:Integer

the order to use as a SmartApplicationListener.

Annotations
@Override
decorateWebSocketHandlerback to summary
protected WebSocketHandler decorateWebSocketHandler(WebSocketHandler handler)
getTransportRegistrationback to summary
protected final WebSocketTransportRegistration getTransportRegistration()
registerStompEndpointsback to summary
protected abstract void registerStompEndpoints(StompEndpointRegistry registry)
stompWebSocketHandlerMappingback to summary
public HandlerMapping stompWebSocketHandlerMapping(WebSocketHandler subProtocolWebSocketHandler, TaskScheduler messageBrokerTaskScheduler, AbstractSubscribableChannel clientInboundChannel)
Annotations
@Bean
subProtocolWebSocketHandlerback to summary
public WebSocketHandler subProtocolWebSocketHandler(AbstractSubscribableChannel clientInboundChannel, AbstractSubscribableChannel clientOutboundChannel)
Annotations
@Bean
webSocketMessageBrokerStatsback to summary
public WebSocketMessageBrokerStats webSocketMessageBrokerStats(AbstractBrokerMessageHandler stompBrokerRelayMessageHandler, WebSocketHandler subProtocolWebSocketHandler, TaskExecutor inboundExecutor, TaskExecutor outboundExecutor, TaskScheduler scheduler)
Annotations
@Bean
webSocketScopeConfigurerback to summary
public static CustomScopeConfigurer webSocketScopeConfigurer()
Annotations
@Bean