public class WebMvcStompWebSocketEndpointRegistration extends java.lang.Object implements StompWebSocketEndpointRegistration
Constructor and Description |
---|
WebMvcStompWebSocketEndpointRegistration(java.lang.String[] paths,
WebSocketHandler webSocketHandler,
TaskScheduler sockJsTaskScheduler) |
Modifier and Type | Method and Description |
---|---|
StompWebSocketEndpointRegistration |
addInterceptors(HandshakeInterceptor... interceptors)
Configure the HandshakeInterceptor's to use.
|
protected HandshakeInterceptor[] |
getInterceptors() |
MultiValueMap<HttpRequestHandler,java.lang.String> |
getMappings() |
StompWebSocketEndpointRegistration |
setAllowedOrigins(java.lang.String... origins)
Configure allowed
Origin header values. |
StompWebSocketEndpointRegistration |
setHandshakeHandler(HandshakeHandler handshakeHandler)
Configure the HandshakeHandler to use.
|
SockJsServiceRegistration |
withSockJS()
Enable SockJS fallback options.
|
public WebMvcStompWebSocketEndpointRegistration(java.lang.String[] paths, WebSocketHandler webSocketHandler, TaskScheduler sockJsTaskScheduler)
public StompWebSocketEndpointRegistration setHandshakeHandler(HandshakeHandler handshakeHandler)
StompWebSocketEndpointRegistration
setHandshakeHandler
in interface StompWebSocketEndpointRegistration
public StompWebSocketEndpointRegistration addInterceptors(HandshakeInterceptor... interceptors)
StompWebSocketEndpointRegistration
addInterceptors
in interface StompWebSocketEndpointRegistration
public StompWebSocketEndpointRegistration setAllowedOrigins(java.lang.String... origins)
StompWebSocketEndpointRegistration
Origin
header values. This check is mostly designed for browser
clients. There is noting preventing other types of client to modify the Origin header value.
When SockJS is enabled and allowed origins are restricted, transport types that do not
use Origin
headers for cross origin requests (jsonp-polling, iframe-xhr-polling,
iframe-eventsource and iframe-htmlfile) are disabled. As a consequence, IE6/IE7 won't be
supported anymore and IE8/IE9 will only be supported without cookies.
By default, all origins are allowed.
setAllowedOrigins
in interface StompWebSocketEndpointRegistration
public SockJsServiceRegistration withSockJS()
StompWebSocketEndpointRegistration
withSockJS
in interface StompWebSocketEndpointRegistration
protected HandshakeInterceptor[] getInterceptors()
public final MultiValueMap<HttpRequestHandler,java.lang.String> getMappings()