类 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 aHandlerMappingfor use in Spring MVC.- 从以下版本开始:
- 4.0
- 作者:
- Rossen Stoyanchev, Artem Bilan
构造器概要
构造器 构造器 说明 WebMvcStompEndpointRegistry(WebSocketHandler webSocketHandler, WebSocketTransportRegistration transportRegistration, UserSessionRegistry userSessionRegistry, TaskScheduler defaultSockJsTaskScheduler)
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 StompWebSocketEndpointRegistrationaddEndpoint(String... paths)Register a STOMP over WebSocket endpoint at the given mapping path.AbstractHandlerMappinggetHandlerMapping()Return a handler mapping with the mapped ViewControllers.protected intgetOrder()protected UrlPathHelpergetUrlPathHelper()protected voidsetApplicationContext(ApplicationContext applicationContext)WebMvcStompEndpointRegistrysetErrorHandler(StompSubProtocolErrorHandler errorHandler)Configure a handler for customizing or handling STOMP ERROR frames to clients.voidsetOrder(int order)Set the order for the resultingHandlerMappingrelative to other handler mappings configured in Spring MVC.voidsetUrlPathHelper(UrlPathHelper urlPathHelper)Set the UrlPathHelper to configure on theHandlerMappingused to map handshake requests.
构造器详细资料
WebMvcStompEndpointRegistry
public WebMvcStompEndpointRegistry(WebSocketHandler webSocketHandler, WebSocketTransportRegistration transportRegistration, UserSessionRegistry userSessionRegistry, TaskScheduler defaultSockJsTaskScheduler)
方法详细资料
addEndpoint
public StompWebSocketEndpointRegistration addEndpoint(String... paths)
从接口复制的说明:StompEndpointRegistryRegister a STOMP over WebSocket endpoint at the given mapping path.- 指定者:
addEndpoint在接口中StompEndpointRegistry
setOrder
public void setOrder(int order)
Set the order for the resultingHandlerMappingrelative 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 theHandlerMappingused to map handshake requests.- 指定者:
setUrlPathHelper在接口中StompEndpointRegistry
getUrlPathHelper
protected UrlPathHelper getUrlPathHelper()
setErrorHandler
public WebMvcStompEndpointRegistry setErrorHandler(StompSubProtocolErrorHandler errorHandler)
从接口复制的说明:StompEndpointRegistryConfigure 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.