Package | Description |
---|---|
org.springframework.web.socket.adapter.jetty |
Adapter classes for the Jetty WebSocket API.
|
org.springframework.web.socket.adapter.standard |
Adapter classes for the standard Java WebSocket API.
|
org.springframework.web.socket.client |
Client-side abstractions for WebSocket applications.
|
org.springframework.web.socket.client.jetty |
Client-side support for the Jetty WebSocket API.
|
org.springframework.web.socket.client.standard |
Client-side classes for use with standard Java WebSocket endpoints.
|
org.springframework.web.socket.config.annotation |
Support for annotation-based WebSocket setup in configuration classes.
|
org.springframework.web.socket.handler |
Convenient
WebSocketHandler
implementations and decorators. |
org.springframework.web.socket.messaging |
WebSocket integration for Spring's messaging module.
|
org.springframework.web.socket.server |
Server-side abstractions for WebSocket interactions.
|
org.springframework.web.socket.server.jetty |
Server-side support for the Jetty 9+ WebSocket API.
|
org.springframework.web.socket.server.standard |
Server-side classes for use with standard JSR-356 WebSocket endpoints.
|
org.springframework.web.socket.server.support |
Server-side support classes including container-specific strategies
for upgrading a request.
|
org.springframework.web.socket.sockjs |
Top-level SockJS types.
|
org.springframework.web.socket.sockjs.client |
SockJS client implementation of
WebSocketClient . |
org.springframework.web.socket.sockjs.support |
Support classes for SockJS including an
AbstractSockJsService
implementation. |
org.springframework.web.socket.sockjs.transport |
Server-side support for SockJS transports including
TransportHandler implementations
for processing incoming requests, their
session
counterparts for sending messages over the various transports, and
DefaultSockJsService . |
org.springframework.web.socket.sockjs.transport.handler |
TransportHandler
implementation classes as well as a concrete
SockJsService . |
org.springframework.web.socket.sockjs.transport.session |
SockJS specific implementations of
WebSocketSession . |
Constructor and Description |
---|
JettyWebSocketHandlerAdapter(WebSocketHandler webSocketHandler,
JettyWebSocketSession wsSession) |
Constructor and Description |
---|
StandardWebSocketHandlerAdapter(WebSocketHandler handler,
StandardWebSocketSession wsSession) |
Modifier and Type | Method and Description |
---|---|
protected WebSocketHandler |
WebSocketConnectionManager.decorateWebSocketHandler(WebSocketHandler handler)
Decorate the WebSocketHandler provided to the class constructor.
|
Modifier and Type | Method and Description |
---|---|
protected WebSocketHandler |
WebSocketConnectionManager.decorateWebSocketHandler(WebSocketHandler handler)
Decorate the WebSocketHandler provided to the class constructor.
|
ListenableFuture<WebSocketSession> |
WebSocketClient.doHandshake(WebSocketHandler webSocketHandler,
java.lang.String uriTemplate,
java.lang.Object... uriVariables) |
ListenableFuture<WebSocketSession> |
AbstractWebSocketClient.doHandshake(WebSocketHandler webSocketHandler,
java.lang.String uriTemplate,
java.lang.Object... uriVars) |
ListenableFuture<WebSocketSession> |
WebSocketClient.doHandshake(WebSocketHandler webSocketHandler,
WebSocketHttpHeaders headers,
java.net.URI uri) |
ListenableFuture<WebSocketSession> |
AbstractWebSocketClient.doHandshake(WebSocketHandler webSocketHandler,
WebSocketHttpHeaders headers,
java.net.URI uri) |
protected abstract ListenableFuture<WebSocketSession> |
AbstractWebSocketClient.doHandshakeInternal(WebSocketHandler webSocketHandler,
HttpHeaders headers,
java.net.URI uri,
java.util.List<java.lang.String> subProtocols,
java.util.List<WebSocketExtension> extensions,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Perform the actual handshake to establish a connection to the server.
|
Constructor and Description |
---|
WebSocketConnectionManager(WebSocketClient client,
WebSocketHandler webSocketHandler,
java.lang.String uriTemplate,
java.lang.Object... uriVariables) |
Modifier and Type | Method and Description |
---|---|
ListenableFuture<WebSocketSession> |
JettyWebSocketClient.doHandshake(WebSocketHandler webSocketHandler,
java.lang.String uriTemplate,
java.lang.Object... uriVars) |
ListenableFuture<WebSocketSession> |
JettyWebSocketClient.doHandshakeInternal(WebSocketHandler wsHandler,
HttpHeaders headers,
java.net.URI uri,
java.util.List<java.lang.String> protocols,
java.util.List<WebSocketExtension> extensions,
java.util.Map<java.lang.String,java.lang.Object> attributes) |
Modifier and Type | Method and Description |
---|---|
protected ListenableFuture<WebSocketSession> |
StandardWebSocketClient.doHandshakeInternal(WebSocketHandler webSocketHandler,
HttpHeaders headers,
java.net.URI uri,
java.util.List<java.lang.String> protocols,
java.util.List<WebSocketExtension> extensions,
java.util.Map<java.lang.String,java.lang.Object> attributes) |
Modifier and Type | Method and Description |
---|---|
protected WebSocketHandler |
WebSocketMessageBrokerConfigurationSupport.decorateWebSocketHandler(WebSocketHandler handler) |
WebSocketHandler |
WebSocketMessageBrokerConfigurationSupport.subProtocolWebSocketHandler() |
Modifier and Type | Method and Description |
---|---|
WebSocketHandlerRegistration |
WebSocketHandlerRegistration.addHandler(WebSocketHandler handler,
java.lang.String... paths)
Add more handlers that will share the same configuration (interceptors, SockJS
config, etc)
|
WebSocketHandlerRegistration |
ServletWebSocketHandlerRegistry.addHandler(WebSocketHandler handler,
java.lang.String... paths) |
WebSocketHandlerRegistration |
WebSocketHandlerRegistry.addHandler(WebSocketHandler webSocketHandler,
java.lang.String... paths)
Configure a WebSocketHandler at the specified URL paths.
|
WebSocketHandlerRegistration |
AbstractWebSocketHandlerRegistration.addHandler(WebSocketHandler handler,
java.lang.String... paths) |
protected abstract void |
AbstractWebSocketHandlerRegistration.addSockJsServiceMapping(M mappings,
SockJsService sockJsService,
WebSocketHandler handler,
java.lang.String pathPattern) |
protected void |
ServletWebSocketHandlerRegistration.addSockJsServiceMapping(MultiValueMap<HttpRequestHandler,java.lang.String> mappings,
SockJsService sockJsService,
WebSocketHandler handler,
java.lang.String pathPattern) |
protected void |
ServletWebSocketHandlerRegistration.addWebSocketHandlerMapping(MultiValueMap<HttpRequestHandler,java.lang.String> mappings,
WebSocketHandler webSocketHandler,
HandshakeHandler handshakeHandler,
HandshakeInterceptor[] interceptors,
java.lang.String path) |
protected abstract void |
AbstractWebSocketHandlerRegistration.addWebSocketHandlerMapping(M mappings,
WebSocketHandler wsHandler,
HandshakeHandler handshakeHandler,
HandshakeInterceptor[] interceptors,
java.lang.String path) |
protected WebSocketHandler |
WebSocketMessageBrokerConfigurationSupport.decorateWebSocketHandler(WebSocketHandler handler) |
Constructor and Description |
---|
WebMvcStompEndpointRegistry(WebSocketHandler webSocketHandler,
WebSocketTransportRegistration transportRegistration,
TaskScheduler defaultSockJsTaskScheduler) |
WebMvcStompWebSocketEndpointRegistration(java.lang.String[] paths,
WebSocketHandler webSocketHandler,
TaskScheduler sockJsTaskScheduler) |
Modifier and Type | Class and Description |
---|---|
class |
AbstractWebSocketHandler
A convenient base class for
WebSocketHandler implementation with empty methods. |
class |
BinaryWebSocketHandler
A convenient base class for
WebSocketHandler implementations
that process binary messages only. |
class |
ExceptionWebSocketHandlerDecorator
An exception handling
WebSocketHandlerDecorator . |
class |
LoggingWebSocketHandlerDecorator
A
WebSocketHandlerDecorator that adds logging to WebSocket lifecycle events. |
class |
PerConnectionWebSocketHandler
A
WebSocketHandler that initializes and destroys a WebSocketHandler
instance for each WebSocket connection and delegates all other methods to it. |
class |
TextWebSocketHandler
A convenient base class for
WebSocketHandler implementations
that process text messages only. |
class |
WebSocketHandlerDecorator
Wraps another
WebSocketHandler
instance and delegates to it. |
Modifier and Type | Method and Description |
---|---|
WebSocketHandler |
WebSocketHandlerDecoratorFactory.decorate(WebSocketHandler handler)
Decorate the given WebSocketHandler.
|
WebSocketHandler |
WebSocketHandlerDecorator.getDelegate() |
WebSocketHandler |
WebSocketHandlerDecorator.getLastHandler() |
static WebSocketHandler |
WebSocketHandlerDecorator.unwrap(WebSocketHandler handler) |
Modifier and Type | Method and Description |
---|---|
WebSocketHandler |
WebSocketHandlerDecoratorFactory.decorate(WebSocketHandler handler)
Decorate the given WebSocketHandler.
|
static WebSocketHandler |
WebSocketHandlerDecorator.unwrap(WebSocketHandler handler) |
Constructor and Description |
---|
ExceptionWebSocketHandlerDecorator(WebSocketHandler delegate) |
LoggingWebSocketHandlerDecorator(WebSocketHandler delegate) |
WebSocketHandlerDecorator(WebSocketHandler delegate) |
Constructor and Description |
---|
PerConnectionWebSocketHandler(java.lang.Class<? extends WebSocketHandler> handlerType) |
PerConnectionWebSocketHandler(java.lang.Class<? extends WebSocketHandler> handlerType,
boolean supportsPartialMessages) |
Modifier and Type | Class and Description |
---|---|
class |
SubProtocolWebSocketHandler
An implementation of
WebSocketHandler that delegates incoming WebSocket
messages to a SubProtocolHandler along with a MessageChannel to which
the sub-protocol handler can send messages from WebSocket clients to the application. |
Modifier and Type | Method and Description |
---|---|
void |
HandshakeInterceptor.afterHandshake(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler wsHandler,
java.lang.Exception exception)
Invoked after the handshake is done.
|
boolean |
HandshakeInterceptor.beforeHandshake(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler wsHandler,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Invoked before the handshake is processed.
|
boolean |
HandshakeHandler.doHandshake(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler wsHandler,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Initiate the handshake.
|
void |
RequestUpgradeStrategy.upgrade(ServerHttpRequest request,
ServerHttpResponse response,
java.lang.String selectedProtocol,
java.util.List<WebSocketExtension> selectedExtensions,
java.security.Principal user,
WebSocketHandler wsHandler,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Perform runtime specific steps to complete the upgrade.
|
Modifier and Type | Method and Description |
---|---|
void |
JettyRequestUpgradeStrategy.upgrade(ServerHttpRequest request,
ServerHttpResponse response,
java.lang.String selectedProtocol,
java.util.List<WebSocketExtension> selectedExtensions,
java.security.Principal user,
WebSocketHandler wsHandler,
java.util.Map<java.lang.String,java.lang.Object> attributes) |
Modifier and Type | Method and Description |
---|---|
void |
AbstractStandardUpgradeStrategy.upgrade(ServerHttpRequest request,
ServerHttpResponse response,
java.lang.String selectedProtocol,
java.util.List<WebSocketExtension> selectedExtensions,
java.security.Principal user,
WebSocketHandler wsHandler,
java.util.Map<java.lang.String,java.lang.Object> attrs) |
Modifier and Type | Method and Description |
---|---|
WebSocketHandler |
WebSocketHttpRequestHandler.getWebSocketHandler()
Return the WebSocketHandler.
|
Modifier and Type | Method and Description |
---|---|
void |
OriginHandshakeInterceptor.afterHandshake(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler wsHandler,
java.lang.Exception exception) |
void |
HttpSessionHandshakeInterceptor.afterHandshake(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler wsHandler,
java.lang.Exception ex) |
boolean |
OriginHandshakeInterceptor.beforeHandshake(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler wsHandler,
java.util.Map<java.lang.String,java.lang.Object> attributes) |
boolean |
HttpSessionHandshakeInterceptor.beforeHandshake(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler wsHandler,
java.util.Map<java.lang.String,java.lang.Object> attributes) |
protected java.util.List<java.lang.String> |
AbstractHandshakeHandler.determineHandlerSupportedProtocols(WebSocketHandler handler)
Determine the sub-protocols supported by the given WebSocketHandler by
checking whether it is an instance of
SubProtocolCapable . |
protected java.security.Principal |
AbstractHandshakeHandler.determineUser(ServerHttpRequest request,
WebSocketHandler wsHandler,
java.util.Map<java.lang.String,java.lang.Object> attributes)
A method that can be used to associate a user with the WebSocket session
in the process of being established.
|
boolean |
AbstractHandshakeHandler.doHandshake(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler wsHandler,
java.util.Map<java.lang.String,java.lang.Object> attributes) |
protected java.lang.String |
AbstractHandshakeHandler.selectProtocol(java.util.List<java.lang.String> requestedProtocols,
WebSocketHandler webSocketHandler)
Perform the sub-protocol negotiation based on requested and supported sub-protocols.
|
Constructor and Description |
---|
HandshakeInterceptorChain(java.util.List<HandshakeInterceptor> interceptors,
WebSocketHandler wsHandler) |
WebSocketHttpRequestHandler(WebSocketHandler wsHandler) |
WebSocketHttpRequestHandler(WebSocketHandler wsHandler,
HandshakeHandler handshakeHandler) |
Modifier and Type | Method and Description |
---|---|
void |
SockJsService.handleRequest(ServerHttpRequest request,
ServerHttpResponse response,
java.lang.String sockJsPath,
WebSocketHandler handler)
Process a SockJS HTTP request.
|
Modifier and Type | Method and Description |
---|---|
WebSocketHandler |
AbstractClientSockJsSession.getWebSocketHandler() |
Modifier and Type | Method and Description |
---|---|
ListenableFuture<WebSocketSession> |
Transport.connect(TransportRequest request,
WebSocketHandler webSocketHandler)
Connect the transport.
|
ListenableFuture<WebSocketSession> |
AbstractXhrTransport.connect(TransportRequest request,
WebSocketHandler handler) |
ListenableFuture<WebSocketSession> |
WebSocketTransport.connect(TransportRequest request,
WebSocketHandler handler) |
protected void |
JettyXhrTransport.connectInternal(TransportRequest transportRequest,
WebSocketHandler handler,
java.net.URI url,
HttpHeaders handshakeHeaders,
XhrClientSockJsSession session,
SettableListenableFuture<WebSocketSession> connectFuture) |
protected abstract void |
AbstractXhrTransport.connectInternal(TransportRequest request,
WebSocketHandler handler,
java.net.URI receiveUrl,
HttpHeaders handshakeHeaders,
XhrClientSockJsSession session,
SettableListenableFuture<WebSocketSession> connectFuture) |
protected void |
RestTemplateXhrTransport.connectInternal(TransportRequest transportRequest,
WebSocketHandler handler,
java.net.URI receiveUrl,
HttpHeaders handshakeHeaders,
XhrClientSockJsSession session,
SettableListenableFuture<WebSocketSession> connectFuture) |
protected void |
UndertowXhrTransport.connectInternal(TransportRequest request,
WebSocketHandler handler,
java.net.URI receiveUrl,
HttpHeaders handshakeHeaders,
XhrClientSockJsSession session,
SettableListenableFuture<WebSocketSession> connectFuture) |
ListenableFuture<WebSocketSession> |
SockJsClient.doHandshake(WebSocketHandler handler,
java.lang.String uriTemplate,
java.lang.Object... uriVars) |
ListenableFuture<WebSocketSession> |
SockJsClient.doHandshake(WebSocketHandler handler,
WebSocketHttpHeaders headers,
java.net.URI url) |
Constructor and Description |
---|
AbstractClientSockJsSession(TransportRequest request,
WebSocketHandler handler,
SettableListenableFuture<WebSocketSession> connectFuture) |
WebSocketClientSockJsSession(TransportRequest request,
WebSocketHandler handler,
SettableListenableFuture<WebSocketSession> connectFuture) |
XhrClientSockJsSession(TransportRequest request,
WebSocketHandler handler,
XhrTransport transport,
SettableListenableFuture<WebSocketSession> connectFuture) |
Modifier and Type | Method and Description |
---|---|
WebSocketHandler |
SockJsHttpRequestHandler.getWebSocketHandler()
Return the
WebSocketHandler . |
Modifier and Type | Method and Description |
---|---|
protected abstract void |
AbstractSockJsService.handleRawWebSocketRequest(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler webSocketHandler)
Handle request for raw WebSocket communication, i.e.
|
void |
AbstractSockJsService.handleRequest(ServerHttpRequest request,
ServerHttpResponse response,
java.lang.String sockJsPath,
WebSocketHandler wsHandler)
This method determines the SockJS path and handles SockJS static URLs.
|
protected abstract void |
AbstractSockJsService.handleTransportRequest(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler webSocketHandler,
java.lang.String sessionId,
java.lang.String transport)
Handle a SockJS session URL (i.e.
|
Constructor and Description |
---|
SockJsHttpRequestHandler(SockJsService sockJsService,
WebSocketHandler webSocketHandler)
Create a new SockJsHttpRequestHandler.
|
Modifier and Type | Method and Description |
---|---|
SockJsSession |
SockJsSessionFactory.createSession(java.lang.String sessionId,
WebSocketHandler handler,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new SockJS session.
|
protected void |
TransportHandlingSockJsService.handleRawWebSocketRequest(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler handler) |
void |
TransportHandler.handleRequest(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler handler,
SockJsSession session)
Handle the given request and delegate messages to the provided
WebSocketHandler . |
protected void |
TransportHandlingSockJsService.handleTransportRequest(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler handler,
java.lang.String sessionId,
java.lang.String transport) |
Modifier and Type | Class and Description |
---|---|
class |
SockJsWebSocketHandler
An implementation of
WebSocketHandler that adds SockJS messages frames, sends
SockJS heartbeat messages, and delegates lifecycle events and messages to a target
WebSocketHandler . |
Modifier and Type | Method and Description |
---|---|
PollingSockJsSession |
XhrPollingTransportHandler.createSession(java.lang.String sessionId,
WebSocketHandler handler,
java.util.Map<java.lang.String,java.lang.Object> attributes) |
PollingSockJsSession |
JsonpPollingTransportHandler.createSession(java.lang.String sessionId,
WebSocketHandler handler,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Deprecated.
|
StreamingSockJsSession |
EventSourceTransportHandler.createSession(java.lang.String sessionId,
WebSocketHandler handler,
java.util.Map<java.lang.String,java.lang.Object> attributes) |
StreamingSockJsSession |
HtmlFileTransportHandler.createSession(java.lang.String sessionId,
WebSocketHandler handler,
java.util.Map<java.lang.String,java.lang.Object> attributes) |
AbstractSockJsSession |
WebSocketTransportHandler.createSession(java.lang.String id,
WebSocketHandler handler,
java.util.Map<java.lang.String,java.lang.Object> attrs) |
StreamingSockJsSession |
XhrStreamingTransportHandler.createSession(java.lang.String sessionId,
WebSocketHandler handler,
java.util.Map<java.lang.String,java.lang.Object> attributes) |
boolean |
WebSocketTransportHandler.doHandshake(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler handler,
java.util.Map<java.lang.String,java.lang.Object> attributes) |
void |
AbstractHttpReceivingTransportHandler.handleRequest(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler wsHandler,
SockJsSession wsSession) |
void |
AbstractHttpSendingTransportHandler.handleRequest(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler wsHandler,
SockJsSession wsSession) |
void |
WebSocketTransportHandler.handleRequest(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler wsHandler,
SockJsSession wsSession) |
protected void |
AbstractHttpReceivingTransportHandler.handleRequestInternal(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler wsHandler,
AbstractHttpSockJsSession sockJsSession) |
void |
JsonpReceivingTransportHandler.handleRequestInternal(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler wsHandler,
AbstractHttpSockJsSession sockJsSession)
Deprecated.
|
Constructor and Description |
---|
SockJsWebSocketHandler(SockJsServiceConfig serviceConfig,
WebSocketHandler webSocketHandler,
WebSocketServerSockJsSession sockJsSession) |
Constructor and Description |
---|
AbstractHttpSockJsSession(java.lang.String id,
SockJsServiceConfig config,
WebSocketHandler wsHandler,
java.util.Map<java.lang.String,java.lang.Object> attributes) |
AbstractSockJsSession(java.lang.String id,
SockJsServiceConfig config,
WebSocketHandler handler,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Create a new instance.
|
PollingSockJsSession(java.lang.String sessionId,
SockJsServiceConfig config,
WebSocketHandler wsHandler,
java.util.Map<java.lang.String,java.lang.Object> attributes) |
StreamingSockJsSession(java.lang.String sessionId,
SockJsServiceConfig config,
WebSocketHandler wsHandler,
java.util.Map<java.lang.String,java.lang.Object> attributes) |
WebSocketServerSockJsSession(java.lang.String id,
SockJsServiceConfig config,
WebSocketHandler handler,
java.util.Map<java.lang.String,java.lang.Object> attributes) |