| Modifier and Type | Method and Description |
|---|---|
| public WebSocketHandlerRegistration | addHandler(WebSocketHandler handler, String... paths)
Add more handlers that will share the same configuration (interceptors, SockJS config, etc). |
| public WebSocketHandlerRegistration | addInterceptors(HandshakeInterceptor... interceptors)
Configure interceptors for the handshake request. |
| public WebSocketHandlerRegistration | setAllowedOriginPatterns(String... originPatterns)
Alternative to |
| public WebSocketHandlerRegistration | setAllowedOrigins(String... origins)
Set the origins for which cross-origin requests are allowed from a browser. |
| public WebSocketHandlerRegistration | |
| public SockJsServiceRegistration |
| addHandler | back to summary |
|---|---|
| public WebSocketHandlerRegistration addHandler(WebSocketHandler handler, String... paths) Add more handlers that will share the same configuration (interceptors, SockJS config, etc). | |
| addInterceptors | back to summary |
|---|---|
| public WebSocketHandlerRegistration addInterceptors(HandshakeInterceptor... interceptors) Configure interceptors for the handshake request. | |
| setAllowedOriginPatterns | back to summary |
|---|---|
| public WebSocketHandlerRegistration setAllowedOriginPatterns(String... originPatterns) Alternative to By default this is not set.
| |
| setAllowedOrigins | back to summary |
|---|---|
| public WebSocketHandlerRegistration setAllowedOrigins(String... origins) 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) Configure the HandshakeHandler to use. | |
| withSockJS | back to summary |
|---|---|
| public SockJsServiceRegistration withSockJS() Enable SockJS fallback options. | |