public class WebSocketConfigurationSupport extends Object
Constructor and Description |
---|
WebSocketConfigurationSupport() |
Modifier and Type | Method and Description |
---|---|
ThreadPoolTaskScheduler |
defaultSockJsTaskScheduler()
The default TaskScheduler to use if none is configured via
SockJsServiceRegistration.setTaskScheduler(org.springframework.scheduling.TaskScheduler) , i.e. |
protected void |
registerWebSocketHandlers(WebSocketHandlerRegistry registry) |
HandlerMapping |
webSocketHandlerMapping() |
@Bean public HandlerMapping webSocketHandlerMapping()
protected void registerWebSocketHandlers(WebSocketHandlerRegistry registry)
@Bean public ThreadPoolTaskScheduler defaultSockJsTaskScheduler()
SockJsServiceRegistration.setTaskScheduler(org.springframework.scheduling.TaskScheduler)
, i.e.
@Configuration @EnableWebSocket public class WebSocketConfig implements WebSocketConfigurer { public void registerWebSocketHandlers(WebSocketHandlerRegistry registry) { registry.addHandler(myWsHandler(), "/echo").withSockJS().setTaskScheduler(myScheduler()); } // ... }