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

public Class DelegatingWebSocketMessageBrokerConfiguration

extends WebSocketMessageBrokerConfigurationSupport
Class Inheritance
Annotations
@Configuration
proxyBeanMethods:false
Imports
java.util.ArrayList, .List, org.springframework.beans.factory.annotation.Autowired, org.springframework.context.annotation.Configuration, org.springframework.messaging.converter.MessageConverter, org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver, .HandlerMethodReturnValueHandler, org.springframework.messaging.simp.config.ChannelRegistration, .MessageBrokerRegistry, org.springframework.util.CollectionUtils

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.

Authors
Rossen Stoyanchev, Sebastien Deleuze
Since
4.0

Field Summary

Modifier and TypeField and Description
private final List<WebSocketMessageBrokerConfigurer>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected void
protected void
protected void
configureClientInboundChannel(ChannelRegistration registration)

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

A hook for subclasses to customize the message channel for inbound messages from WebSocket clients.

protected void
configureClientOutboundChannel(ChannelRegistration registration)

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

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)

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

A hook for subclasses to customize message broker configuration through the provided MessageBrokerRegistry instance.

protected boolean
configureMessageConverters(List<MessageConverter>
the list to add converters to, initially empty
messageConverters
)

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

Override this method to add custom message converters.

protected void
protected int
protected void
public void
Inherited from org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurationSupport:
createAnnotationMethodMessageHandlercreateJacksonConvertercreateLocalUserRegistrydecorateWebSocketHandlergetTransportRegistrationstompWebSocketHandlerMappingsubProtocolWebSocketHandlerwebSocketMessageBrokerStatswebSocketScopeConfigurer

Field Detail

configurersback to summary
private final List<WebSocketMessageBrokerConfigurer> configurers

Constructor Detail

DelegatingWebSocketMessageBrokerConfigurationback to summary
public DelegatingWebSocketMessageBrokerConfiguration()

Method Detail

addArgumentResolversback to summary
protected void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers)

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

Annotations
@Override
addReturnValueHandlersback to summary
protected void addReturnValueHandlers(List<HandlerMethodReturnValueHandler> returnValueHandlers)

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

Annotations
@Override
configureClientInboundChannelback to summary
protected void configureClientInboundChannel(ChannelRegistration registration)

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

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

A hook for subclasses to customize the message channel for inbound messages from WebSocket clients.

Annotations
@Override
configureClientOutboundChannelback to summary
protected void configureClientOutboundChannel(ChannelRegistration registration)

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

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

A hook for subclasses to customize the message channel for messages from the application or message broker to WebSocket clients.

Annotations
@Override
configureMessageBrokerback to summary
protected void configureMessageBroker(MessageBrokerRegistry registry)

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

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

A hook for subclasses to customize message broker configuration through the provided MessageBrokerRegistry instance.

Annotations
@Override
configureMessageConvertersback to summary
protected boolean configureMessageConverters(List<MessageConverter> messageConverters)

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

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

Override this method to add custom message converters.

Parameters
messageConverters:List<MessageConverter>

the list to add converters to, initially empty

Returns:boolean

true if default message converters should be added to list, false if no more converters should be added

Annotations
@Override
configureWebSocketTransportback to summary
protected void configureWebSocketTransport(WebSocketTransportRegistration registration)

Overrides org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurationSupport.configureWebSocketTransport.

Annotations
@Override
initPhaseback to summary
protected int initPhase()

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

Annotations
@Override
registerStompEndpointsback to summary
protected void registerStompEndpoints(StompEndpointRegistry registry)

Implements abstract org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurationSupport.registerStompEndpoints.

Annotations
@Override
setConfigurersback to summary
public void setConfigurers(List<WebSocketMessageBrokerConfigurer> configurers)
Annotations
@Autowired
required:false