public class WebMvcStompWebSocketEndpointRegistration extends Object implements StompWebSocketEndpointRegistration
Constructor and Description |
---|
WebMvcStompWebSocketEndpointRegistration(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,String> |
getMappings() |
StompWebSocketEndpointRegistration |
setAllowedOrigins(String... origins)
Configure allowed
Origin header values. |
StompWebSocketEndpointRegistration |
setHandshakeHandler(HandshakeHandler handshakeHandler)
Configure the HandshakeHandler to use.
|
SockJsServiceRegistration |
withSockJS()
Enable SockJS fallback options.
|
public WebMvcStompWebSocketEndpointRegistration(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(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,String> getMappings()