Top Description Fields Constructors Methods
org.springframework.web.socket.config.annotation

public Class ServletWebSocketHandlerRegistry

extends Object
implements WebSocketHandlerRegistry
Class Inheritance
All Implemented Interfaces
org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry
Imports
java.util.ArrayList, .LinkedHashMap, .List, .Map, .Objects, org.springframework.lang.Nullable, org.springframework.scheduling.TaskScheduler, org.springframework.util.MultiValueMap, org.springframework.web.HttpRequestHandler, org.springframework.web.servlet.handler.AbstractHandlerMapping, .SimpleUrlHandlerMapping, org.springframework.web.socket.WebSocketHandler, org.springframework.web.socket.server.support.WebSocketHandlerMapping, org.springframework.web.util.UrlPathHelper

WebSocketHandlerRegistry with Spring MVC handler mappings for the handshake requests.
Author
Rossen Stoyanchev
Since
4.0

Field Summary

Modifier and TypeField and Description
private int
private final List<ServletWebSocketHandlerRegistration>
private UrlPathHelper

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public WebSocketHandlerRegistration
addHandler(WebSocketHandler handler, String... paths)

Implements org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry.addHandler.

Configure a WebSocketHandler at the specified URL paths.

public AbstractHandlerMapping
public int
public UrlPathHelper
protected boolean
requiresTaskScheduler()

Whether there are any endpoint SockJS registrations without a TaskScheduler.

public 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.

public void
setUrlPathHelper(UrlPathHelper urlPathHelper)

Set the UrlPathHelper to configure on the SimpleUrlHandlerMapping used to map handshake requests.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

orderback to summary
private int order
registrationsback to summary
private final List<ServletWebSocketHandlerRegistration> registrations
urlPathHelperback to summary
private UrlPathHelper urlPathHelper
Annotations
@Nullable

Constructor Detail

ServletWebSocketHandlerRegistryback to summary
public ServletWebSocketHandlerRegistry()

Method Detail

addHandlerback to summary
public WebSocketHandlerRegistration addHandler(WebSocketHandler handler, String... paths)

Implements org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry.addHandler.

Doc from org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry.addHandler.

Configure a WebSocketHandler at the specified URL paths.

Annotations
@Override
getHandlerMappingback to summary
public AbstractHandlerMapping getHandlerMapping()
getOrderback to summary
public int getOrder()
getUrlPathHelperback to summary
public UrlPathHelper getUrlPathHelper()
Annotations
@Nullable
requiresTaskSchedulerback to summary
protected boolean requiresTaskScheduler()

Whether there are any endpoint SockJS registrations without a TaskScheduler. This method should be invoked just before getHandlerMapping() to allow for registrations to be made first.

setOrderback to summary
public void setOrder(int order)

Set the order for the resulting SimpleUrlHandlerMapping relative to other handler mappings configured in Spring MVC.

The default value is 1.

setTaskSchedulerback to summary
protected void setTaskScheduler(TaskScheduler scheduler)

Provide the TaskScheduler to use for SockJS endpoints for which a task scheduler has not been explicitly registered. This method must be called prior to getHandlerMapping().

setUrlPathHelperback to summary
public void setUrlPathHelper(UrlPathHelper urlPathHelper)

Set the UrlPathHelper to configure on the SimpleUrlHandlerMapping used to map handshake requests.