public class ServletWebSocketHandlerRegistry extends java.lang.Object implements WebSocketHandlerRegistry
WebSocketHandlerRegistry
with Spring MVC handler mappings for the
handshake requests.Constructor and Description |
---|
ServletWebSocketHandlerRegistry() |
Modifier and Type | Method and Description |
---|---|
WebSocketHandlerRegistration |
addHandler(WebSocketHandler handler,
java.lang.String... paths)
Configure a WebSocketHandler at the specified URL paths.
|
AbstractHandlerMapping |
getHandlerMapping() |
int |
getOrder() |
UrlPathHelper |
getUrlPathHelper() |
protected boolean |
requiresTaskScheduler()
Whether there are any endpoint SockJS registrations without a TaskScheduler.
|
void |
setOrder(int order)
Set the order for the resulting
SimpleUrlHandlerMapping relative to
other handler mappings configured in Spring MVC. |
protected void |
setTaskScheduler(TaskScheduler scheduler)
Provide the TaskScheduler to use for SockJS endpoints for which a task
scheduler has not been explicitly registered.
|
void |
setUrlPathHelper(UrlPathHelper urlPathHelper)
Set the UrlPathHelper to configure on the
SimpleUrlHandlerMapping
used to map handshake requests. |
public WebSocketHandlerRegistration addHandler(WebSocketHandler handler, java.lang.String... paths)
WebSocketHandlerRegistry
addHandler
in interface WebSocketHandlerRegistry
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(@Nullable UrlPathHelper urlPathHelper)
SimpleUrlHandlerMapping
used to map handshake requests.@Nullable public UrlPathHelper getUrlPathHelper()
protected boolean requiresTaskScheduler()
getHandlerMapping()
to
allow for registrations to be made first.protected void setTaskScheduler(TaskScheduler scheduler)
getHandlerMapping()
.public AbstractHandlerMapping getHandlerMapping()