Class ServletWebSocketHandlerRegistry
java.lang.Object
org.springframework.web.socket.config.annotation.ServletWebSocketHandlerRegistry
- All Implemented Interfaces:
- WebSocketHandlerRegistry
WebSocketHandlerRegistry with Spring MVC handler mappings for the
 handshake requests.- Since:
- 4.0
- Author:
- Rossen Stoyanchev
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionaddHandler(WebSocketHandler handler, String... paths) Configure a WebSocketHandler at the specified URL paths.intgetOrder()protected booleanWhether there are any endpoint SockJS registrations without a TaskScheduler.voidsetOrder(int order) Set the order for the resultingSimpleUrlHandlerMappingrelative to other handler mappings configured in Spring MVC.protected voidsetTaskScheduler(TaskScheduler scheduler) Provide the TaskScheduler to use for SockJS endpoints for which a task scheduler has not been explicitly registered.voidsetUrlPathHelper(UrlPathHelper urlPathHelper) Set the UrlPathHelper to configure on theSimpleUrlHandlerMappingused to map handshake requests.
- 
Constructor Details- 
ServletWebSocketHandlerRegistrypublic ServletWebSocketHandlerRegistry()
 
- 
- 
Method Details- 
addHandlerDescription copied from interface:WebSocketHandlerRegistryConfigure a WebSocketHandler at the specified URL paths.- Specified by:
- addHandlerin interface- WebSocketHandlerRegistry
 
- 
setOrderpublic void setOrder(int order) Set the order for the resultingSimpleUrlHandlerMappingrelative to other handler mappings configured in Spring MVC.The default value is 1. 
- 
getOrderpublic int getOrder()
- 
setUrlPathHelperSet the UrlPathHelper to configure on theSimpleUrlHandlerMappingused to map handshake requests.
- 
getUrlPathHelper
- 
requiresTaskSchedulerprotected boolean requiresTaskScheduler()Whether there are any endpoint SockJS registrations without a TaskScheduler. This method should be invoked just beforegetHandlerMapping()to allow for registrations to be made first.
- 
setTaskSchedulerProvide the TaskScheduler to use for SockJS endpoints for which a task scheduler has not been explicitly registered. This method must be called prior togetHandlerMapping().
- 
getHandlerMapping
 
-