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> |
AbstractWebSocketClient.doHandshake(WebSocketHandler webSocketHandler,
String uriTemplate,
Object... uriVars) |
ListenableFuture<WebSocketSession> |
WebSocketClient.doHandshake(WebSocketHandler webSocketHandler,
String uriTemplate,
Object... uriVariables) |
ListenableFuture<WebSocketSession> |
AbstractWebSocketClient.doHandshake(WebSocketHandler webSocketHandler,
WebSocketHttpHeaders headers,
URI uri) |
ListenableFuture<WebSocketSession> |
WebSocketClient.doHandshake(WebSocketHandler webSocketHandler,
WebSocketHttpHeaders headers,
URI uri) |
protected abstract ListenableFuture<WebSocketSession> |
AbstractWebSocketClient.doHandshakeInternal(WebSocketHandler webSocketHandler,
HttpHeaders headers,
URI uri,
List<String> subProtocols,
List<WebSocketExtension> extensions,
Map<String,Object> attributes)
Perform the actual handshake to establish a connection to the server.
|
Constructor and Description |
---|
WebSocketConnectionManager(WebSocketClient client,
WebSocketHandler webSocketHandler,
String uriTemplate,
Object... uriVariables) |
Modifier and Type | Method and Description |
---|---|
ListenableFuture<WebSocketSession> |
JettyWebSocketClient.doHandshake(WebSocketHandler webSocketHandler,
String uriTemplate,
Object... uriVars) |
ListenableFuture<WebSocketSession> |
JettyWebSocketClient.doHandshakeInternal(WebSocketHandler wsHandler,
HttpHeaders headers,
URI uri,
List<String> protocols,
List<WebSocketExtension> extensions,
Map<String,Object> attributes) |
Modifier and Type | Method and Description |
---|---|
protected ListenableFuture<WebSocketSession> |
StandardWebSocketClient.doHandshakeInternal(WebSocketHandler webSocketHandler,
HttpHeaders headers,
URI uri,
List<String> protocols,
List<WebSocketExtension> extensions,
Map<String,Object> attributes) |
Modifier and Type | Method and Description |
---|---|
protected WebSocketHandler |
WebSocketMessageBrokerConfigurationSupport.decorateWebSocketHandler(WebSocketHandler handler) |
WebSocketHandler |
WebSocketMessageBrokerConfigurationSupport.subProtocolWebSocketHandler() |
Modifier and Type | Method and Description |
---|---|
WebSocketHandlerRegistration |
WebSocketHandlerRegistry.addHandler(WebSocketHandler webSocketHandler,
String... paths)
Configure a WebSocketHandler at the specified URL paths.
|
WebSocketHandlerRegistration |
AbstractWebSocketHandlerRegistration.addHandler(WebSocketHandler handler,
String... paths) |
WebSocketHandlerRegistration |
ServletWebSocketHandlerRegistry.addHandler(WebSocketHandler handler,
String... paths) |
WebSocketHandlerRegistration |
WebSocketHandlerRegistration.addHandler(WebSocketHandler handler,
String... paths)
Add more handlers that will share the same configuration (interceptors, SockJS
config, etc).
|
protected abstract void |
AbstractWebSocketHandlerRegistration.addSockJsServiceMapping(M mappings,
SockJsService sockJsService,
WebSocketHandler handler,
String pathPattern) |
protected void |
ServletWebSocketHandlerRegistration.addSockJsServiceMapping(MultiValueMap<HttpRequestHandler,String> mappings,
SockJsService sockJsService,
WebSocketHandler handler,
String pathPattern) |
protected void |
ServletWebSocketHandlerRegistration.addWebSocketHandlerMapping(MultiValueMap<HttpRequestHandler,String> mappings,
WebSocketHandler webSocketHandler,
HandshakeHandler handshakeHandler,
HandshakeInterceptor[] interceptors,
String path) |
protected abstract void |
AbstractWebSocketHandlerRegistration.addWebSocketHandlerMapping(M mappings,
WebSocketHandler wsHandler,
HandshakeHandler handshakeHandler,
HandshakeInterceptor[] interceptors,
String path) |
protected WebSocketHandler |
WebSocketMessageBrokerConfigurationSupport.decorateWebSocketHandler(WebSocketHandler handler) |
Constructor and Description |
---|
WebMvcStompEndpointRegistry(WebSocketHandler webSocketHandler,
WebSocketTransportRegistration transportRegistration,
TaskScheduler defaultSockJsTaskScheduler) |
WebMvcStompWebSocketEndpointRegistration(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(Class<? extends WebSocketHandler> handlerType) |
PerConnectionWebSocketHandler(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,
Exception exception)
Invoked after the handshake is done.
|
boolean |
HandshakeInterceptor.beforeHandshake(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler wsHandler,
Map<String,Object> attributes)
Invoked before the handshake is processed.
|
boolean |
HandshakeHandler.doHandshake(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler wsHandler,
Map<String,Object> attributes)
Initiate the handshake.
|
void |
RequestUpgradeStrategy.upgrade(ServerHttpRequest request,
ServerHttpResponse response,
String selectedProtocol,
List<WebSocketExtension> selectedExtensions,
Principal user,
WebSocketHandler wsHandler,
Map<String,Object> attributes)
Perform runtime specific steps to complete the upgrade.
|
Modifier and Type | Method and Description |
---|---|
void |
JettyRequestUpgradeStrategy.upgrade(ServerHttpRequest request,
ServerHttpResponse response,
String selectedProtocol,
List<WebSocketExtension> selectedExtensions,
Principal user,
WebSocketHandler wsHandler,
Map<String,Object> attributes) |
Modifier and Type | Method and Description |
---|---|
void |
AbstractStandardUpgradeStrategy.upgrade(ServerHttpRequest request,
ServerHttpResponse response,
String selectedProtocol,
List<WebSocketExtension> selectedExtensions,
Principal user,
WebSocketHandler wsHandler,
Map<String,Object> attrs) |
Modifier and Type | Method and Description |
---|---|
protected WebSocketHandler |
WebSocketHttpRequestHandler.decorate(WebSocketHandler handler)
Decorate the
WebSocketHandler passed into the constructor. |
WebSocketHandler |
WebSocketHttpRequestHandler.getWebSocketHandler()
Return the WebSocketHandler.
|
Modifier and Type | Method and Description |
---|---|
void |
OriginHandshakeInterceptor.afterHandshake(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler wsHandler,
Exception exception) |
void |
HttpSessionHandshakeInterceptor.afterHandshake(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler wsHandler,
Exception ex) |
boolean |
OriginHandshakeInterceptor.beforeHandshake(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler wsHandler,
Map<String,Object> attributes) |
boolean |
HttpSessionHandshakeInterceptor.beforeHandshake(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler wsHandler,
Map<String,Object> attributes) |
protected WebSocketHandler |
WebSocketHttpRequestHandler.decorate(WebSocketHandler handler)
Decorate the
WebSocketHandler passed into the constructor. |
protected List<String> |
AbstractHandshakeHandler.determineHandlerSupportedProtocols(WebSocketHandler handler)
Determine the sub-protocols supported by the given WebSocketHandler by
checking whether it is an instance of
SubProtocolCapable . |
protected Principal |
AbstractHandshakeHandler.determineUser(ServerHttpRequest request,
WebSocketHandler wsHandler,
Map<String,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,
Map<String,Object> attributes) |
protected String |
AbstractHandshakeHandler.selectProtocol(List<String> requestedProtocols,
WebSocketHandler webSocketHandler)
Perform the sub-protocol negotiation based on requested and supported sub-protocols.
|
Constructor and Description |
---|
HandshakeInterceptorChain(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,
String sockJsPath,
WebSocketHandler handler)
Process a SockJS HTTP request.
|
Modifier and Type | Method and Description |
---|---|
WebSocketHandler |
AbstractClientSockJsSession.getWebSocketHandler() |
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,
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,
String sessionId,
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(String sessionId,
WebSocketHandler handler,
Map<String,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,
String sessionId,
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 |
---|---|
StreamingSockJsSession |
XhrStreamingTransportHandler.createSession(String sessionId,
WebSocketHandler handler,
Map<String,Object> attributes) |
StreamingSockJsSession |
HtmlFileTransportHandler.createSession(String sessionId,
WebSocketHandler handler,
Map<String,Object> attributes) |
PollingSockJsSession |
XhrPollingTransportHandler.createSession(String sessionId,
WebSocketHandler handler,
Map<String,Object> attributes) |
AbstractSockJsSession |
WebSocketTransportHandler.createSession(String id,
WebSocketHandler handler,
Map<String,Object> attrs) |
StreamingSockJsSession |
EventSourceTransportHandler.createSession(String sessionId,
WebSocketHandler handler,
Map<String,Object> attributes) |
boolean |
WebSocketTransportHandler.doHandshake(ServerHttpRequest request,
ServerHttpResponse response,
WebSocketHandler handler,
Map<String,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) |
Constructor and Description |
---|
SockJsWebSocketHandler(SockJsServiceConfig serviceConfig,
WebSocketHandler webSocketHandler,
WebSocketServerSockJsSession sockJsSession) |
Constructor and Description |
---|
AbstractHttpSockJsSession(String id,
SockJsServiceConfig config,
WebSocketHandler wsHandler,
Map<String,Object> attributes) |
AbstractSockJsSession(String id,
SockJsServiceConfig config,
WebSocketHandler handler,
Map<String,Object> attributes)
Create a new instance.
|
PollingSockJsSession(String sessionId,
SockJsServiceConfig config,
WebSocketHandler wsHandler,
Map<String,Object> attributes) |
StreamingSockJsSession(String sessionId,
SockJsServiceConfig config,
WebSocketHandler wsHandler,
Map<String,Object> attributes) |
WebSocketServerSockJsSession(String id,
SockJsServiceConfig config,
WebSocketHandler handler,
Map<String,Object> attributes) |