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 void
addArgumentResolvers
(List<HandlerMethodArgumentResolver> argumentResolvers) protected void
addReturnValueHandlers
(List<HandlerMethodReturnValueHandler> returnValueHandlers) protected void
configureClientInboundChannel
(ChannelRegistration registration) A hook for subclasses to customize the message channel for inbound messages from WebSocket clients.protected void
configureClientOutboundChannel
(ChannelRegistration registration) A hook for subclasses to customize the message channel for messages from the application or message broker to WebSocket clients.protected void
configureMessageBroker
(MessageBrokerRegistry registry) A hook for subclasses to customize message broker configuration through the providedMessageBrokerRegistry
instance.protected boolean
configureMessageConverters
(List<MessageConverter> messageConverters) Override this method to add custom message converters.protected void
configureWebSocketTransport
(WebSocketTransportRegistration registration) protected int
protected void
registerStompEndpoints
(StompEndpointRegistry registry) void
setConfigurers
(List<WebSocketMessageBrokerConfigurer> configurers) Methods inherited from class WebSocketMessageBrokerConfigurationSupport
createAnnotationMethodMessageHandler, createLocalUserRegistry, decorateWebSocketHandler, getTransportRegistration, stompWebSocketHandlerMapping, subProtocolWebSocketHandler, webSocketMessageBrokerStats, webSocketScopeConfigurer
Methods 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:
registerStompEndpoints
in classWebSocketMessageBrokerConfigurationSupport
-
configureWebSocketTransport
- Overrides:
configureWebSocketTransport
in classWebSocketMessageBrokerConfigurationSupport
-
configureClientInboundChannel
Description copied from class:AbstractMessageBrokerConfiguration
A hook for subclasses to customize the message channel for inbound messages from WebSocket clients.- Overrides:
configureClientInboundChannel
in classAbstractMessageBrokerConfiguration
-
configureClientOutboundChannel
Description copied from class:AbstractMessageBrokerConfiguration
A hook for subclasses to customize the message channel for messages from the application or message broker to WebSocket clients.- Overrides:
configureClientOutboundChannel
in classAbstractMessageBrokerConfiguration
-
addArgumentResolvers
- Overrides:
addArgumentResolvers
in classAbstractMessageBrokerConfiguration
-
addReturnValueHandlers
- Overrides:
addReturnValueHandlers
in classAbstractMessageBrokerConfiguration
-
configureMessageConverters
Description copied from class:AbstractMessageBrokerConfiguration
Override this method to add custom message converters.- Overrides:
configureMessageConverters
in classAbstractMessageBrokerConfiguration
- Parameters:
messageConverters
- the list to add converters to, initially empty- Returns:
true
if default message converters should be added to list,false
if no more converters should be added
-
configureMessageBroker
Description copied from class:AbstractMessageBrokerConfiguration
A hook for subclasses to customize message broker configuration through the providedMessageBrokerRegistry
instance.- Overrides:
configureMessageBroker
in classAbstractMessageBrokerConfiguration
-
initPhase
protected int initPhase()- Overrides:
initPhase
in classAbstractMessageBrokerConfiguration
-