WebSocketHandlerRegistrations that gathers all the configuration
options but allows subclasses to put together the actual HTTP request mappings.
| Modifier and Type | Field and Description |
|---|---|
| private final List | |
| private final List | |
| private final MultiValueMap | |
| private HandshakeHandler | |
| private final List | |
| private SockJsServiceRegistration |
| Access | Constructor and Description |
|---|---|
| public |
| allowedOriginPatterns | back to summary |
|---|---|
| private final List<String> allowedOriginPatterns | |
| allowedOrigins | back to summary |
|---|---|
| private final List<String> allowedOrigins | |
| handlerMap | back to summary |
|---|---|
| private final MultiValueMap<WebSocketHandler, String> handlerMap | |
| handshakeHandler | back to summary |
|---|---|
| private HandshakeHandler handshakeHandler
| |
| interceptors | back to summary |
|---|---|
| private final List<HandshakeInterceptor> interceptors | |
| sockJsServiceRegistration | back to summary |
|---|---|
| private SockJsServiceRegistration sockJsServiceRegistration
| |
| AbstractWebSocketHandlerRegistration | back to summary |
|---|---|
| public AbstractWebSocketHandlerRegistration() | |
| addHandler | back to summary |
|---|---|
| public WebSocketHandlerRegistration addHandler(WebSocketHandler handler, String... paths) Implements org. Doc from org. Add more handlers that will share the same configuration (interceptors, SockJS config, etc).
| |
| addInterceptors | back to summary |
|---|---|
| public WebSocketHandlerRegistration addInterceptors(HandshakeInterceptor... interceptors) Implements org. Doc from org. Configure interceptors for the handshake request.
| |
| addSockJsServiceMapping | back to summary |
|---|---|
| protected abstract void addSockJsServiceMapping(M mappings, SockJsService sockJsService, WebSocketHandler handler, String pathPattern) | |
| addWebSocketHandlerMapping | back to summary |
|---|---|
| protected abstract void addWebSocketHandlerMapping(M mappings, WebSocketHandler wsHandler, HandshakeHandler handshakeHandler, HandshakeInterceptor[] interceptors, String path) | |
| createMappings | back to summary |
|---|---|
| protected abstract M createMappings() | |
| getHandshakeHandler | back to summary |
|---|---|
protected HandshakeHandler getHandshakeHandler()
| |
| getInterceptors | back to summary |
|---|---|
| protected HandshakeInterceptor[] getInterceptors() | |
| getMappings | back to summary |
|---|---|
| protected final M getMappings() | |
| getOrCreateHandshakeHandler | back to summary |
|---|---|
| private HandshakeHandler getOrCreateHandshakeHandler() | |
| getSockJsServiceRegistration | back to summary |
|---|---|
| protected SockJsServiceRegistration getSockJsServiceRegistration() Expose the
| |
| setAllowedOriginPatterns | back to summary |
|---|---|
| public WebSocketHandlerRegistration setAllowedOriginPatterns(String... allowedOriginPatterns) Implements org. Alternative to By default this is not set.
| |
| setAllowedOrigins | back to summary |
|---|---|
| public WebSocketHandlerRegistration setAllowedOrigins(String... allowedOrigins) Implements org. Doc from org. Set the origins for which cross-origin requests are allowed from a browser.
Please, refer to By default, no origins are allowed. When
Note when SockJS is enabled and origins are restricted, transport types that do not allow to check request origin (Iframe based transports) are disabled. As a consequence, IE 6 to 9 are not supported when origins are restricted.
| |
| setHandshakeHandler | back to summary |
|---|---|
| public WebSocketHandlerRegistration setHandshakeHandler(HandshakeHandler handshakeHandler) Implements org. Doc from org. Configure the HandshakeHandler to use.
| |
| withSockJS | back to summary |
|---|---|
| public SockJsServiceRegistration withSockJS() Implements org. Doc from org. Enable SockJS fallback options.
| |