类 WebMvcStompEndpointRegistry
- java.lang.Object
- org.springframework.web.socket.config.annotation.WebMvcStompEndpointRegistry
- 所有已实现的接口:
StompEndpointRegistry
public class WebMvcStompEndpointRegistry extends Object implements StompEndpointRegistry
A registry for STOMP over WebSocket endpoints that maps the endpoints with aHandlerMapping
for use in Spring MVC.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev, Artem Bilan
构造器概要
构造器 构造器 说明 WebMvcStompEndpointRegistry(WebSocketHandler webSocketHandler, WebSocketTransportRegistration transportRegistration, UserSessionRegistry userSessionRegistry, TaskScheduler defaultSockJsTaskScheduler)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StompWebSocketEndpointRegistration
addEndpoint(String... paths)
Register a STOMP over WebSocket endpoint at the given mapping path.AbstractHandlerMapping
getHandlerMapping()
Return a handler mapping with the mapped ViewControllers.protected int
getOrder()
protected UrlPathHelper
getUrlPathHelper()
protected void
setApplicationContext(ApplicationContext applicationContext)
WebMvcStompEndpointRegistry
setErrorHandler(StompSubProtocolErrorHandler errorHandler)
Configure a handler for customizing or handling STOMP ERROR frames to clients.void
setOrder(int order)
Set the order for the resultingHandlerMapping
relative to other handler mappings configured in Spring MVC.void
setUrlPathHelper(UrlPathHelper urlPathHelper)
Set the UrlPathHelper to configure on theHandlerMapping
used to map handshake requests.
构造器详细资料
WebMvcStompEndpointRegistry
public WebMvcStompEndpointRegistry(WebSocketHandler webSocketHandler, WebSocketTransportRegistration transportRegistration, UserSessionRegistry userSessionRegistry, TaskScheduler defaultSockJsTaskScheduler)
方法详细资料
addEndpoint
public StompWebSocketEndpointRegistration addEndpoint(String... paths)
从接口复制的说明:StompEndpointRegistry
Register a STOMP over WebSocket endpoint at the given mapping path.- 指定者:
addEndpoint
在接口中StompEndpointRegistry
setOrder
public void setOrder(int order)
Set the order for the resultingHandlerMapping
relative to other handler mappings configured in Spring MVC.The default value is 1.
- 指定者:
setOrder
在接口中StompEndpointRegistry
getOrder
protected int getOrder()
setUrlPathHelper
public void setUrlPathHelper(UrlPathHelper urlPathHelper)
Set the UrlPathHelper to configure on theHandlerMapping
used to map handshake requests.- 指定者:
setUrlPathHelper
在接口中StompEndpointRegistry
getUrlPathHelper
protected UrlPathHelper getUrlPathHelper()
setErrorHandler
public WebMvcStompEndpointRegistry setErrorHandler(StompSubProtocolErrorHandler errorHandler)
从接口复制的说明:StompEndpointRegistry
Configure a handler for customizing or handling STOMP ERROR frames to clients.- 指定者:
setErrorHandler
在接口中StompEndpointRegistry
- 参数:
errorHandler
- the error handler
setApplicationContext
protected void setApplicationContext(ApplicationContext applicationContext)
getHandlerMapping
public AbstractHandlerMapping getHandlerMapping()
Return a handler mapping with the mapped ViewControllers.