public class WebMvcStompEndpointRegistry extends java.lang.Object implements StompEndpointRegistry
SimpleUrlHandlerMapping
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. |
int |
getOrder() |
UrlPathHelper |
getUrlPathHelper() |
protected void |
setApplicationContext(ApplicationContext applicationContext) |
void |
setOrder(int order)
Set the order for the resulting
SimpleUrlHandlerMapping relative to
other handler mappings configured in Spring MVC. |
void |
setUrlPathHelper(UrlPathHelper urlPathHelper)
Set the UrlPathHelper to configure on the
SimpleUrlHandlerMapping
used to map handshake requests. |
private static SubProtocolWebSocketHandler |
unwrapSubProtocolWebSocketHandler(WebSocketHandler wsHandler) |
private final WebSocketHandler webSocketHandler
private final SubProtocolWebSocketHandler subProtocolWebSocketHandler
private final StompSubProtocolHandler stompHandler
private final java.util.List<WebMvcStompWebSocketEndpointRegistration> registrations
private final TaskScheduler sockJsScheduler
private int order
private UrlPathHelper urlPathHelper
public WebMvcStompEndpointRegistry(WebSocketHandler webSocketHandler, WebSocketTransportRegistration transportRegistration, UserSessionRegistry userSessionRegistry, TaskScheduler defaultSockJsTaskScheduler)
private static SubProtocolWebSocketHandler unwrapSubProtocolWebSocketHandler(WebSocketHandler wsHandler)
protected void setApplicationContext(ApplicationContext applicationContext)
public StompWebSocketEndpointRegistration addEndpoint(java.lang.String... paths)
StompEndpointRegistry
addEndpoint
in interface StompEndpointRegistry
public void setOrder(int order)
SimpleUrlHandlerMapping
relative to
other handler mappings configured in Spring MVC.
The default value is 1.
public int getOrder()
public void setUrlPathHelper(UrlPathHelper urlPathHelper)
SimpleUrlHandlerMapping
used to map handshake requests.public UrlPathHelper getUrlPathHelper()
public AbstractHandlerMapping getHandlerMapping()
null
in case of no registrations.