public class WebSocketConfigurationSupport extends Object
Constructor and Description |
---|
WebSocketConfigurationSupport() |
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) |
@Bean public HandlerMapping webSocketHandlerMapping(@Qualifier(value="defaultSockJsTaskScheduler") @Nullable TaskScheduler scheduler)
protected void registerWebSocketHandlers(WebSocketHandlerRegistry registry)
@Bean @Nullable public TaskScheduler defaultSockJsTaskScheduler()
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()); } // ... }