public class ServerWebSocketContainer extends IntegrationWebSocketContainer implements org.springframework.web.socket.config.annotation.WebSocketConfigurer
IntegrationWebSocketContainer implementation for the server
WebSocketHandler registration.
Registers an internal IntegrationWebSocketContainer.IntegrationWebSocketHandler
for provided paths with the WebSocketHandlerRegistry.
The real registration is based on Spring Web-Socket infrastructure via WebSocketConfigurer
implementation of this class.
| Modifier and Type | Class and Description |
|---|---|
static class |
ServerWebSocketContainer.SockJsServiceOptions |
logger, sessions, webSocketHandler| Constructor and Description |
|---|
ServerWebSocketContainer(java.lang.String... paths) |
| Modifier and Type | Method and Description |
|---|---|
void |
registerWebSocketHandlers(org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry registry) |
ServerWebSocketContainer |
setAllowedOrigins(java.lang.String... origins)
Configure allowed
Origin header values. |
ServerWebSocketContainer |
setDecoratorFactories(org.springframework.web.socket.handler.WebSocketHandlerDecoratorFactory... factories)
Configure one or more factories to decorate the handler used to process
WebSocket messages.
|
ServerWebSocketContainer |
setHandshakeHandler(org.springframework.web.socket.server.HandshakeHandler handshakeHandler) |
ServerWebSocketContainer |
setInterceptors(org.springframework.web.socket.server.HandshakeInterceptor... interceptors) |
void |
setSockJsServiceOptions(ServerWebSocketContainer.SockJsServiceOptions sockJsServiceOptions) |
ServerWebSocketContainer |
withSockJs(ServerWebSocketContainer.SockJsServiceOptions... sockJsServiceOptions) |
addSupportedProtocols, closeSession, destroy, getSession, getSessions, getSubProtocols, setMessageListener, setSendBufferSizeLimit, setSendTimeLimit, setSupportedProtocolspublic ServerWebSocketContainer(java.lang.String... paths)
public ServerWebSocketContainer setHandshakeHandler(org.springframework.web.socket.server.HandshakeHandler handshakeHandler)
public ServerWebSocketContainer setInterceptors(org.springframework.web.socket.server.HandshakeInterceptor... interceptors)
public ServerWebSocketContainer setDecoratorFactories(org.springframework.web.socket.handler.WebSocketHandlerDecoratorFactory... factories)
factories - the WebSocketHandlerDecoratorFactory array to usepublic ServerWebSocketContainer setAllowedOrigins(java.lang.String... origins)
Origin header values.origins - the origins to allow.WebSocketHandlerRegistration.setAllowedOrigins(String...)public ServerWebSocketContainer withSockJs(ServerWebSocketContainer.SockJsServiceOptions... sockJsServiceOptions)
public void setSockJsServiceOptions(ServerWebSocketContainer.SockJsServiceOptions sockJsServiceOptions)
public void registerWebSocketHandlers(org.springframework.web.socket.config.annotation.WebSocketHandlerRegistry registry)
registerWebSocketHandlers in interface org.springframework.web.socket.config.annotation.WebSocketConfigurer