Class ServletWebSocketHandlerRegistry
- java.lang.Object
- org.springframework.web.socket.config.annotation.ServletWebSocketHandlerRegistry
- All Implemented Interfaces:
WebSocketHandlerRegistry
public class ServletWebSocketHandlerRegistry extends Object implements WebSocketHandlerRegistry
AWebSocketHandlerRegistry
that mapsWebSocketHandler
s to URLs for use in a Servlet container.- Since:
- 4.0
- Author:
- Rossen Stoyanchev
Constructor Summary
Constructors Constructor Description ServletWebSocketHandlerRegistry(ThreadPoolTaskScheduler sockJsTaskScheduler)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WebSocketHandlerRegistration
addHandler(WebSocketHandler webSocketHandler, String... paths)
Configure a WebSocketHandler at the specified URL paths.AbstractHandlerMapping
getHandlerMapping()
Return aHandlerMapping
with mappedHttpRequestHandler
s.int
getOrder()
UrlPathHelper
getUrlPathHelper()
void
setOrder(int order)
Set the order for the resultingSimpleUrlHandlerMapping
relative to other handler mappings configured in Spring MVC.void
setUrlPathHelper(UrlPathHelper urlPathHelper)
Set the UrlPathHelper to configure on theSimpleUrlHandlerMapping
used to map handshake requests.
Constructor Detail
ServletWebSocketHandlerRegistry
public ServletWebSocketHandlerRegistry(ThreadPoolTaskScheduler sockJsTaskScheduler)
Method Detail
addHandler
public WebSocketHandlerRegistration addHandler(WebSocketHandler webSocketHandler, String... paths)
Description copied from interface:WebSocketHandlerRegistry
Configure a WebSocketHandler at the specified URL paths.- Specified by:
addHandler
in interfaceWebSocketHandlerRegistry
setOrder
public void setOrder(int order)
Set the order for the resultingSimpleUrlHandlerMapping
relative to other handler mappings configured in Spring MVC.The default value is 1.
getOrder
public int getOrder()
setUrlPathHelper
public void setUrlPathHelper(UrlPathHelper urlPathHelper)
Set the UrlPathHelper to configure on theSimpleUrlHandlerMapping
used to map handshake requests.
getUrlPathHelper
public UrlPathHelper getUrlPathHelper()
getHandlerMapping
public AbstractHandlerMapping getHandlerMapping()
Return aHandlerMapping
with mappedHttpRequestHandler
s.