public class WebMvcStompEndpointRegistry extends java.lang.Object implements StompEndpointRegistry
HandlerMapping
for use in Spring MVC.Modifier and Type | Field and Description |
---|---|
private int |
order |
private java.util.List<WebMvcStompWebSocketEndpointRegistration> |
registrations |
private TaskScheduler |
sockJsScheduler |
private StompSubProtocolHandler |
stompHandler |
private SubProtocolWebSocketHandler |
subProtocolWebSocketHandler |
private UrlPathHelper |
urlPathHelper |
private WebSocketHandler |
webSocketHandler |
Constructor and Description |
---|
WebMvcStompEndpointRegistry(WebSocketHandler webSocketHandler,
WebSocketTransportRegistration transportRegistration,
UserSessionRegistry userSessionRegistry,
TaskScheduler defaultSockJsTaskScheduler) |
Modifier and Type | Method and Description |
---|---|
StompWebSocketEndpointRegistration |
addEndpoint(java.lang.String... paths)
Register a STOMP over WebSocket endpoint at the given mapping path.
|
AbstractHandlerMapping |
getHandlerMapping()
Return a handler mapping with the mapped ViewControllers; or
null
in case of no registrations. |
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 resulting
HandlerMapping
relative to other handler mappings configured in Spring MVC. |
void |
setUrlPathHelper(UrlPathHelper urlPathHelper)
Set the UrlPathHelper to configure on the
HandlerMapping
used to map handshake requests. |
private static SubProtocolWebSocketHandler |
unwrapSubProtocolWebSocketHandler(WebSocketHandler handler) |
private final WebSocketHandler webSocketHandler
private final TaskScheduler sockJsScheduler
private int order
private UrlPathHelper urlPathHelper
private final SubProtocolWebSocketHandler subProtocolWebSocketHandler
private final StompSubProtocolHandler stompHandler
private final java.util.List<WebMvcStompWebSocketEndpointRegistration> registrations
public WebMvcStompEndpointRegistry(WebSocketHandler webSocketHandler, WebSocketTransportRegistration transportRegistration, UserSessionRegistry userSessionRegistry, TaskScheduler defaultSockJsTaskScheduler)
private static SubProtocolWebSocketHandler unwrapSubProtocolWebSocketHandler(WebSocketHandler handler)
protected void setApplicationContext(ApplicationContext applicationContext)
public StompWebSocketEndpointRegistration addEndpoint(java.lang.String... paths)
StompEndpointRegistry
addEndpoint
in interface StompEndpointRegistry
public void setOrder(int order)
HandlerMapping
relative to other handler mappings configured in Spring MVC.
The default value is 1.
setOrder
in interface StompEndpointRegistry
protected int getOrder()
public void setUrlPathHelper(UrlPathHelper urlPathHelper)
HandlerMapping
used to map handshake requests.setUrlPathHelper
in interface StompEndpointRegistry
protected UrlPathHelper getUrlPathHelper()
public WebMvcStompEndpointRegistry setErrorHandler(StompSubProtocolErrorHandler errorHandler)
StompEndpointRegistry
setErrorHandler
in interface StompEndpointRegistry
errorHandler
- the error handlerpublic AbstractHandlerMapping getHandlerMapping()
null
in case of no registrations.