Class DefaultSockJsService

All Implemented Interfaces:
Aware, Lifecycle, ServletContextAware, CorsConfigurationSource, SockJsService, SockJsServiceConfig

public class DefaultSockJsService extends TransportHandlingSockJsService implements ServletContextAware
A default implementation of SockJsService with all default TransportHandler implementations pre-registered.
Since:
4.0
Author:
Rossen Stoyanchev, Juergen Hoeller
  • Constructor Details

    • DefaultSockJsService

      public DefaultSockJsService(TaskScheduler scheduler)
      Create a DefaultSockJsService with default handler types.
      Parameters:
      scheduler - a task scheduler for heart-beat messages and removing timed-out sessions; the provided TaskScheduler should be declared as a Spring bean to ensure it is initialized at start up and shut down when the application stops.
    • DefaultSockJsService

      public DefaultSockJsService(TaskScheduler scheduler, TransportHandler... handlerOverrides)
      Create a DefaultSockJsService with overridden handler types replacing the corresponding default handler implementation.
      Parameters:
      scheduler - a task scheduler for heart-beat messages and removing timed-out sessions; the provided TaskScheduler should be declared as a Spring bean to ensure it gets initialized at start-up and shuts down when the application stops
      handlerOverrides - zero or more overrides to the default transport handler types
    • DefaultSockJsService

      public DefaultSockJsService(TaskScheduler scheduler, Collection<TransportHandler> handlerOverrides)
      Create a DefaultSockJsService with overridden handler types replacing the corresponding default handler implementation.
      Parameters:
      scheduler - a task scheduler for heart-beat messages and removing timed-out sessions; the provided TaskScheduler should be declared as a Spring bean to ensure it gets initialized at start-up and shuts down when the application stops
      handlerOverrides - zero or more overrides to the default transport handler types
  • Method Details