org.springframework.web.socket.config.annotation

## Interface WebSocketMessageBrokerConfigurer

All Known Implementing Classes:
  AbstractWebSocketMessageBrokerConfigurer

    public interface WebSocketMessageBrokerConfigurer

Defines methods for configuring message handling with simple messaging protocols (e.g. STOMP) from WebSocket clients.

Typically used to customize the configuration provided via `@EnableWebSocketMessageBroker`.

Since:
  4.0
Author:
  Rossen Stoyanchev

### Method Summary

All Methods Instance Methods Default Methods
`default void` `addArgumentResolvers(List<org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver> argumentResolvers)` Add resolvers to support custom controller method argument types.
`default void` `addReturnValueHandlers(List<org.springframework.messaging.handler.invocation.HandlerMethodReturnValueHandler> returnValueHandlers)` Add handlers to support custom controller method return value types.
`default void` `configureClientInboundChannel(org.springframework.messaging.simp.config.ChannelRegistration registration)` Configure the `MessageChannel` used for incoming messages from WebSocket clients.
`default void` `configureClientOutboundChannel(org.springframework.messaging.simp.config.ChannelRegistration registration)` Configure the `MessageChannel` used for outbound messages to WebSocket clients.
`default void` `configureMessageBroker(org.springframework.messaging.simp.config.MessageBrokerRegistry registry)` Configure message broker options.
`default boolean` `configureMessageConverters(List<org.springframework.messaging.converter.MessageConverter> messageConverters)` Configure the message converters to use when extracting the payload of messages in annotated methods and when sending messages (e.g.
`default void` `configureWebSocketTransport(WebSocketTransportRegistration registry)` Configure options related to the processing of messages received from and sent to WebSocket clients.
`default void` `registerStompEndpoints(StompEndpointRegistry registry)` Register STOMP endpoints mapping each to a specific URL and (optionally) enabling and configuring SockJS fallback options.

### Method Detail

#### registerStompEndpoints

    default void registerStompEndpoints(StompEndpointRegistry registry)

Register STOMP endpoints mapping each to a specific URL and (optionally) enabling and configuring SockJS fallback options.

#### configureWebSocketTransport

    default void configureWebSocketTransport(WebSocketTransportRegistration registry)

Configure options related to the processing of messages received from and sent to WebSocket clients.

#### configureClientInboundChannel

    default void configureClientInboundChannel(org.springframework.messaging.simp.config.ChannelRegistration registration)

Configure the `MessageChannel` used for incoming messages from WebSocket clients. By default the channel is backed by a thread pool of size 1. It is recommended to customize thread pool settings for production use.

#### configureClientOutboundChannel

    default void configureClientOutboundChannel(org.springframework.messaging.simp.config.ChannelRegistration registration)

Configure the `MessageChannel` used for outbound messages to WebSocket clients. By default the channel is backed by a thread pool of size 1. It is recommended to customize thread pool settings for production use.

#### addArgumentResolvers

    default void addArgumentResolvers(List<org.springframework.messaging.handler.invocation.HandlerMethodArgumentResolver> argumentResolvers)

Add resolvers to support custom controller method argument types.

This does not override the built-in support for resolving handler method arguments. To customize the built-in support for argument resolution, configure `SimpAnnotationMethodMessageHandler` directly.

Parameters:
  `argumentResolvers` - the resolvers to register (initially an empty list)
Since:
  4.1.1

#### addReturnValueHandlers

    default void addReturnValueHandlers(List<org.springframework.messaging.handler.invocation.HandlerMethodReturnValueHandler> returnValueHandlers)

Add handlers to support custom controller method return value types.

Using this option does not override the built-in support for handling return values. To customize the built-in support for handling return values, configure `SimpAnnotationMethodMessageHandler` directly.

Parameters:
  `returnValueHandlers` - the handlers to register (initially an empty list)
Since:
  4.1.1

#### configureMessageConverters

    default boolean configureMessageConverters(List<org.springframework.messaging.converter.MessageConverter> messageConverters)

Configure the message converters to use when extracting the payload of messages in annotated methods and when sending messages (e.g. through the "broker" SimpMessagingTemplate).

The provided list, initially empty, can be used to add message converters while the boolean return value is used to determine if default message should be added as well.

Parameters:
  `messageConverters` - the converters to configure (initially an empty list)
Returns:
  whether to also add default converter or not

#### configureMessageBroker

    default void configureMessageBroker(org.springframework.messaging.simp.config.MessageBrokerRegistry registry)

Configure message broker options.