Class DelegatingWebSocketMessageBrokerConfiguration
java.lang.Object
org.springframework.messaging.simp.config.AbstractMessageBrokerConfiguration
org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurationSupport
org.springframework.web.socket.config.annotation.DelegatingWebSocketMessageBrokerConfiguration
- All Implemented Interfaces:
Aware, ApplicationContextAware
@Configuration(proxyBeanMethods=false)
public class DelegatingWebSocketMessageBrokerConfiguration
extends WebSocketMessageBrokerConfigurationSupport
A
WebSocketMessageBrokerConfigurationSupport extension that detects
beans of type WebSocketMessageBrokerConfigurer and delegates to all
of them allowing callback style customization of the configuration provided
in WebSocketMessageBrokerConfigurationSupport.
This class is typically imported via EnableWebSocketMessageBroker.
- Since:
- 4.0
- Author:
- Rossen Stoyanchev, Sebastien Deleuze
-
Field Summary
Fields inherited from class WebSocketMessageBrokerConfigurationSupport
SCOPE_WEBSOCKET -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) protected voidaddReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers) protected voidconfigureClientInboundChannel(ChannelRegistration registration) A hook for subclasses to customize the message channel for inbound messages from WebSocket clients.protected voidconfigureClientOutboundChannel(ChannelRegistration registration) A hook for subclasses to customize the message channel for messages from the application or message broker to WebSocket clients.protected voidconfigureMessageBroker(MessageBrokerRegistry registry) A hook for subclasses to customize message broker configuration through the providedMessageBrokerRegistryinstance.protected booleanconfigureMessageConverters(List<MessageConverter> messageConverters) Override this method to add custom message converters.protected voidconfigureWebSocketTransport(WebSocketTransportRegistration registration) protected intprotected voidregisterStompEndpoints(StompEndpointRegistry registry) voidsetConfigurers(List<WebSocketMessageBrokerConfigurer> configurers) Methods inherited from class WebSocketMessageBrokerConfigurationSupport
createAnnotationMethodMessageHandler, createLocalUserRegistry, decorateWebSocketHandler, getTransportRegistration, stompWebSocketHandlerMapping, subProtocolWebSocketHandler, webSocketMessageBrokerStats, webSocketScopeConfigurerMethods inherited from class AbstractMessageBrokerConfiguration
brokerChannel, brokerChannelExecutor, brokerMessageConverter, brokerMessagingTemplate, clientInboundChannel, clientInboundChannelExecutor, clientOutboundChannel, clientOutboundChannelExecutor, createJacksonConverter, createJacksonJsonConverter, getApplicationContext, getBrokerRegistry, getClientInboundChannelRegistration, getClientOutboundChannelRegistration, getPathMatcher, getPhase, getValidator, messageBrokerTaskScheduler, setApplicationContext, simpAnnotationMethodMessageHandler, simpleBrokerMessageHandler, simpValidator, stompBrokerRelayMessageHandler, userDestinationMessageHandler, userDestinationResolver, userRegistry, userRegistryMessageHandler
-
Constructor Details
-
DelegatingWebSocketMessageBrokerConfiguration
public DelegatingWebSocketMessageBrokerConfiguration()
-
-
Method Details
-
setConfigurers
@Autowired(required=false) public void setConfigurers(List<WebSocketMessageBrokerConfigurer> configurers) -
registerStompEndpoints
- Specified by:
registerStompEndpointsin classWebSocketMessageBrokerConfigurationSupport
-
configureWebSocketTransport
- Overrides:
configureWebSocketTransportin classWebSocketMessageBrokerConfigurationSupport
-
configureClientInboundChannel
Description copied from class:AbstractMessageBrokerConfigurationA hook for subclasses to customize the message channel for inbound messages from WebSocket clients.- Overrides:
configureClientInboundChannelin classAbstractMessageBrokerConfiguration
-
configureClientOutboundChannel
Description copied from class:AbstractMessageBrokerConfigurationA hook for subclasses to customize the message channel for messages from the application or message broker to WebSocket clients.- Overrides:
configureClientOutboundChannelin classAbstractMessageBrokerConfiguration
-
addArgumentResolvers
- Overrides:
addArgumentResolversin classAbstractMessageBrokerConfiguration
-
addReturnValueHandlers
- Overrides:
addReturnValueHandlersin classAbstractMessageBrokerConfiguration
-
configureMessageConverters
Description copied from class:AbstractMessageBrokerConfigurationOverride this method to add custom message converters.- Overrides:
configureMessageConvertersin classAbstractMessageBrokerConfiguration- Parameters:
messageConverters- the list to add converters to, initially empty- Returns:
trueif default message converters should be added to list,falseif no more converters should be added
-
configureMessageBroker
Description copied from class:AbstractMessageBrokerConfigurationA hook for subclasses to customize message broker configuration through the providedMessageBrokerRegistryinstance.- Overrides:
configureMessageBrokerin classAbstractMessageBrokerConfiguration
-
initPhase
protected int initPhase()- Overrides:
initPhasein classAbstractMessageBrokerConfiguration
-