org.springframework.web.socket.config.annotation

## Class WebSocketConfigurationSupport

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

- Direct Known Subclasses:
    DelegatingWebSocketConfiguration

      public class WebSocketConfigurationSupport
      extends Object

  Configuration support for WebSocket request handling.
  Since:
    4.0
  Author:
    Rossen Stoyanchev, Sebastien Deleuze

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `WebSocketConfigurationSupport()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `TaskScheduler` | `defaultSockJsTaskScheduler()` The default TaskScheduler to use if none is registered explicitly via `SockJsServiceRegistration.setTaskScheduler(org.springframework.scheduling.TaskScheduler)`:
         @Configuration
         @EnableWebSocket
         public class WebSocketConfig implements WebSocketConfigurer {

           public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
             registry.addHandler(myHandler(), "/echo")
                     .withSockJS()
                     .setTaskScheduler(myScheduler());
           }

           // ...
    `protected void` | `registerWebSocketHandlers(WebSocketHandlerRegistry registry)`
    `HandlerMapping` | `webSocketHandlerMapping(TaskScheduler scheduler)`

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

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

- - ### Constructor Detail

    - #### WebSocketConfigurationSupport

          public WebSocketConfigurationSupport()

  - ### Method Detail

    - #### webSocketHandlerMapping

          @Bean
          public HandlerMapping webSocketHandlerMapping(@Qualifier(value="defaultSockJsTaskScheduler") @Nullable
                                                              TaskScheduler scheduler)

    - #### registerWebSocketHandlers

          protected void registerWebSocketHandlers(WebSocketHandlerRegistry registry)

    - #### defaultSockJsTaskScheduler

          @Bean
           @Nullable
          public TaskScheduler defaultSockJsTaskScheduler()

      The default TaskScheduler to use if none is registered explicitly via `SockJsServiceRegistration.setTaskScheduler(org.springframework.scheduling.TaskScheduler)`:

           @Configuration
           @EnableWebSocket
           public class WebSocketConfig implements WebSocketConfigurer {

             public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) {
               registry.addHandler(myHandler(), "/echo")
                       .withSockJS()
                       .setTaskScheduler(myScheduler());
             }

             // ...
           }