类 ServletWebSocketHandlerRegistry
- java.lang.Object
- org.springframework.web.socket.config.annotation.ServletWebSocketHandlerRegistry
- 所有已实现的接口:
WebSocketHandlerRegistry
public class ServletWebSocketHandlerRegistry extends Object implements WebSocketHandlerRegistry
AWebSocketHandlerRegistrythat mapsWebSocketHandlers to URLs for use in a Servlet container.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev
构造器概要
构造器 构造器 说明 ServletWebSocketHandlerRegistry(ThreadPoolTaskScheduler sockJsTaskScheduler)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 WebSocketHandlerRegistrationaddHandler(WebSocketHandler webSocketHandler, String... paths)Configure a WebSocketHandler at the specified URL paths.AbstractHandlerMappinggetHandlerMapping()Return aHandlerMappingwith mappedHttpRequestHandlers.intgetOrder()UrlPathHelpergetUrlPathHelper()voidsetOrder(int order)Set the order for the resultingSimpleUrlHandlerMappingrelative to other handler mappings configured in Spring MVC.voidsetUrlPathHelper(UrlPathHelper urlPathHelper)Set the UrlPathHelper to configure on theSimpleUrlHandlerMappingused to map handshake requests.
构造器详细资料
ServletWebSocketHandlerRegistry
public ServletWebSocketHandlerRegistry(ThreadPoolTaskScheduler sockJsTaskScheduler)
方法详细资料
addHandler
public WebSocketHandlerRegistration addHandler(WebSocketHandler webSocketHandler, String... paths)
从接口复制的说明:WebSocketHandlerRegistryConfigure a WebSocketHandler at the specified URL paths.- 指定者:
addHandler在接口中WebSocketHandlerRegistry
setOrder
public void setOrder(int order)
Set the order for the resultingSimpleUrlHandlerMappingrelative 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 theSimpleUrlHandlerMappingused to map handshake requests.
getUrlPathHelper
public UrlPathHelper getUrlPathHelper()
getHandlerMapping
public AbstractHandlerMapping getHandlerMapping()
Return aHandlerMappingwith mappedHttpRequestHandlers.