org.springframework.web.socket.config.annotation

## Class AbstractWebSocketMessageBrokerConfigurer

- java.lang.Object
- - org.springframework.web.socket.config.annotation.AbstractWebSocketMessageBrokerConfigurer

- All Implemented Interfaces:
    WebSocketMessageBrokerConfigurer

      public abstract class AbstractWebSocketMessageBrokerConfigurer
      extends Object
      implements WebSocketMessageBrokerConfigurer

  A convenient abstract base class for `WebSocketMessageBrokerConfigurer` implementations providing empty method implementations for optional methods.
  Since:
    4.0.1
  Author:
    Rossen Stoyanchev

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AbstractWebSocketMessageBrokerConfigurer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `configureClientInboundChannel(ChannelRegistration registration)` Configure the `MessageChannel` used for incoming messages from WebSocket clients.
    `void` | `configureClientOutboundChannel(ChannelRegistration registration)` Configure the `MessageChannel` used for incoming messages from WebSocket clients.
    `void` | `configureMessageBroker(MessageBrokerRegistry registry)` Configure message broker options.
    `boolean` | `configureMessageConverters(List<MessageConverter> messageConverters)` Configure the message converters to use when extracting the payload of messages in annotated methods and when sending messages (e.g.
    `void` | `configureWebSocketTransport(WebSocketTransportRegistration registration)` Configure options related to the processing of messages received from and sent to WebSocket clients.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface org.springframework.web.socket.config.annotation.WebSocketMessageBrokerConfigurer

      `registerStompEndpoints`

- - ### Constructor Detail

    - #### AbstractWebSocketMessageBrokerConfigurer

          public AbstractWebSocketMessageBrokerConfigurer()

  - ### Method Detail

    - #### configureWebSocketTransport

          public void configureWebSocketTransport(WebSocketTransportRegistration registration)

      Description copied from interface: `WebSocketMessageBrokerConfigurer`
      Configure options related to the processing of messages received from and sent to WebSocket clients.
      Specified by:
        `configureWebSocketTransport` in interface `WebSocketMessageBrokerConfigurer`

    - #### configureClientInboundChannel

          public void configureClientInboundChannel(ChannelRegistration registration)

      Description copied from interface: `WebSocketMessageBrokerConfigurer`
      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.
      Specified by:
        `configureClientInboundChannel` in interface `WebSocketMessageBrokerConfigurer`

    - #### configureClientOutboundChannel

          public void configureClientOutboundChannel(ChannelRegistration registration)

      Description copied from interface: `WebSocketMessageBrokerConfigurer`
      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.
      Specified by:
        `configureClientOutboundChannel` in interface `WebSocketMessageBrokerConfigurer`

    - #### configureMessageConverters

          public boolean configureMessageConverters(List<MessageConverter> messageConverters)

      Description copied from interface: `WebSocketMessageBrokerConfigurer`
      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.

      Specified by:
        `configureMessageConverters` in interface `WebSocketMessageBrokerConfigurer`
      Parameters:
        `messageConverters` - initially an empty list of converters
      Returns:
        whether to also add default converter or not

    - #### configureMessageBroker

          public void configureMessageBroker(MessageBrokerRegistry registry)

      Description copied from interface: `WebSocketMessageBrokerConfigurer`
      Configure message broker options.
      Specified by:
        `configureMessageBroker` in interface `WebSocketMessageBrokerConfigurer`