Uses of Interface
org.springframework.web.socket.WebSocketSession
Package
Description
Common abstractions and Spring configuration support for WebSocket applications.
Classes adapting Spring's WebSocket API to and from WebSocket providers.
Adapter classes for the Jetty WebSocket API.
Adapter classes for the standard Jakarta WebSocket API.
Client-side abstractions for WebSocket applications.
Client-side classes for use with standard Jakarta WebSocket endpoints.
Convenient
WebSocketHandler
implementations and decorators.WebSocket integration for Spring's messaging module.
SockJS client implementation of
WebSocketClient
.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
.TransportHandler
implementation classes as well as a concrete
SockJsService
.SockJS specific implementations of
WebSocketSession
.-
Uses of WebSocketSession in org.springframework.web.socket
Modifier and TypeMethodDescriptionvoid
WebSocketHandler.afterConnectionClosed
(WebSocketSession session, CloseStatus closeStatus) Invoked after the WebSocket connection has been closed by either side, or after a transport error has occurred.void
WebSocketHandler.afterConnectionEstablished
(WebSocketSession session) Invoked after WebSocket negotiation has succeeded and the WebSocket connection is opened and ready for use.void
WebSocketHandler.handleMessage
(WebSocketSession session, WebSocketMessage<?> message) Invoked when a new WebSocket message arrives.void
WebSocketHandler.handleTransportError
(WebSocketSession session, Throwable exception) Handle an error from the underlying WebSocket message transport. -
Uses of WebSocketSession in org.springframework.web.socket.adapter
Modifier and TypeInterfaceDescriptioninterface
AWebSocketSession
that exposes the underlying, native WebSocketSession through a getter.Modifier and TypeClassDescriptionclass
An abstract base class for implementations ofWebSocketSession
. -
Uses of WebSocketSession in org.springframework.web.socket.adapter.jetty
-
Uses of WebSocketSession in org.springframework.web.socket.adapter.standard
Modifier and TypeClassDescriptionclass
AWebSocketSession
for use with the standard WebSocket for Java API. -
Uses of WebSocketSession in org.springframework.web.socket.client
Modifier and TypeMethodDescriptiondefault ListenableFuture<WebSocketSession>
WebSocketClient.doHandshake
(WebSocketHandler webSocketHandler, String uriTemplate, Object... uriVariables) Deprecated.default ListenableFuture<WebSocketSession>
WebSocketClient.doHandshake
(WebSocketHandler webSocketHandler, WebSocketHttpHeaders headers, URI uri) Deprecated.as of 6.0, in favor ofWebSocketClient.execute(WebSocketHandler, WebSocketHttpHeaders, URI)
protected ListenableFuture<WebSocketSession>
AbstractWebSocketClient.doHandshakeInternal
(WebSocketHandler webSocketHandler, HttpHeaders headers, URI uri, List<String> subProtocols, List<WebSocketExtension> extensions, Map<String, Object> attributes) Deprecated.as of 6.0, in favor ofAbstractWebSocketClient.executeInternal(WebSocketHandler, HttpHeaders, URI, List, List, Map)
AbstractWebSocketClient.execute
(WebSocketHandler webSocketHandler, String uriTemplate, Object... uriVars) AbstractWebSocketClient.execute
(WebSocketHandler webSocketHandler, WebSocketHttpHeaders headers, URI uri) WebSocketClient.execute
(WebSocketHandler webSocketHandler, String uriTemplate, Object... uriVariables) Execute a handshake request to the given url and handle the resulting WebSocket session with the given handler.WebSocketClient.execute
(WebSocketHandler webSocketHandler, WebSocketHttpHeaders headers, URI uri) Execute a handshake request to the given url and handle the resulting WebSocket session with the given handler.protected abstract CompletableFuture<WebSocketSession>
AbstractWebSocketClient.executeInternal
(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. -
Uses of WebSocketSession in org.springframework.web.socket.client.standard
Modifier and TypeMethodDescriptionprotected CompletableFuture<WebSocketSession>
StandardWebSocketClient.executeInternal
(WebSocketHandler webSocketHandler, HttpHeaders headers, URI uri, List<String> protocols, List<WebSocketExtension> extensions, Map<String, Object> attributes) -
Uses of WebSocketSession in org.springframework.web.socket.handler
Modifier and TypeClassDescriptionclass
Wrap aWebSocketSession
to guarantee only one thread can send messages at a time.class
Wraps anotherWebSocketSession
instance and delegates to it.Modifier and TypeMethodDescriptionWebSocketSessionDecorator.getDelegate()
WebSocketSessionDecorator.getLastSession()
static WebSocketSession
WebSocketSessionDecorator.unwrap
(WebSocketSession session) Modifier and TypeMethodDescriptionvoid
AbstractWebSocketHandler.afterConnectionClosed
(WebSocketSession session, CloseStatus status) void
ExceptionWebSocketHandlerDecorator.afterConnectionClosed
(WebSocketSession session, CloseStatus closeStatus) void
LoggingWebSocketHandlerDecorator.afterConnectionClosed
(WebSocketSession session, CloseStatus closeStatus) void
PerConnectionWebSocketHandler.afterConnectionClosed
(WebSocketSession session, CloseStatus closeStatus) void
WebSocketHandlerDecorator.afterConnectionClosed
(WebSocketSession session, CloseStatus closeStatus) void
AbstractWebSocketHandler.afterConnectionEstablished
(WebSocketSession session) void
ExceptionWebSocketHandlerDecorator.afterConnectionEstablished
(WebSocketSession session) void
LoggingWebSocketHandlerDecorator.afterConnectionEstablished
(WebSocketSession session) void
PerConnectionWebSocketHandler.afterConnectionEstablished
(WebSocketSession session) void
WebSocketHandlerDecorator.afterConnectionEstablished
(WebSocketSession session) protected void
AbstractWebSocketHandler.handleBinaryMessage
(WebSocketSession session, BinaryMessage message) protected void
TextWebSocketHandler.handleBinaryMessage
(WebSocketSession session, BinaryMessage message) void
AbstractWebSocketHandler.handleMessage
(WebSocketSession session, WebSocketMessage<?> message) void
ExceptionWebSocketHandlerDecorator.handleMessage
(WebSocketSession session, WebSocketMessage<?> message) void
LoggingWebSocketHandlerDecorator.handleMessage
(WebSocketSession session, WebSocketMessage<?> message) void
PerConnectionWebSocketHandler.handleMessage
(WebSocketSession session, WebSocketMessage<?> message) void
WebSocketHandlerDecorator.handleMessage
(WebSocketSession session, WebSocketMessage<?> message) protected void
AbstractWebSocketHandler.handlePongMessage
(WebSocketSession session, PongMessage message) protected void
AbstractWebSocketHandler.handleTextMessage
(WebSocketSession session, TextMessage message) protected void
BinaryWebSocketHandler.handleTextMessage
(WebSocketSession session, TextMessage message) void
AbstractWebSocketHandler.handleTransportError
(WebSocketSession session, Throwable exception) void
ExceptionWebSocketHandlerDecorator.handleTransportError
(WebSocketSession session, Throwable exception) void
LoggingWebSocketHandlerDecorator.handleTransportError
(WebSocketSession session, Throwable exception) void
PerConnectionWebSocketHandler.handleTransportError
(WebSocketSession session, Throwable exception) void
WebSocketHandlerDecorator.handleTransportError
(WebSocketSession session, Throwable exception) static void
ExceptionWebSocketHandlerDecorator.tryCloseWithError
(WebSocketSession session, Throwable exception, Log logger) static WebSocketSession
WebSocketSessionDecorator.unwrap
(WebSocketSession session) ModifierConstructorDescriptionConcurrentWebSocketSessionDecorator
(WebSocketSession delegate, int sendTimeLimit, int bufferSizeLimit) Basic constructor.ConcurrentWebSocketSessionDecorator
(WebSocketSession delegate, int sendTimeLimit, int bufferSizeLimit, ConcurrentWebSocketSessionDecorator.OverflowStrategy overflowStrategy) Constructor that also specifies the overflow strategy to use. -
Uses of WebSocketSession in org.springframework.web.socket.messaging
Modifier and TypeMethodDescriptionprotected WebSocketSession
SubProtocolWebSocketHandler.decorateSession
(WebSocketSession session) Decorate the givenWebSocketSession
, if desired.Modifier and TypeMethodDescriptionvoid
SubProtocolWebSocketHandler.afterConnectionClosed
(WebSocketSession session, CloseStatus closeStatus) void
SubProtocolWebSocketHandler.afterConnectionEstablished
(WebSocketSession session) void
StompSubProtocolHandler.afterSessionEnded
(WebSocketSession session, CloseStatus closeStatus, MessageChannel outputChannel) void
SubProtocolHandler.afterSessionEnded
(WebSocketSession session, CloseStatus closeStatus, MessageChannel outputChannel) Invoked after aWebSocketSession
has ended.void
StompSubProtocolHandler.afterSessionStarted
(WebSocketSession session, MessageChannel outputChannel) void
SubProtocolHandler.afterSessionStarted
(WebSocketSession session, MessageChannel outputChannel) Invoked after aWebSocketSession
has started.protected WebSocketSession
SubProtocolWebSocketHandler.decorateSession
(WebSocketSession session) Decorate the givenWebSocketSession
, if desired.protected final SubProtocolHandler
SubProtocolWebSocketHandler.findProtocolHandler
(WebSocketSession session) Find aSubProtocolHandler
for the given session.void
SubProtocolWebSocketHandler.handleMessage
(WebSocketSession session, WebSocketMessage<?> message) Handle an inbound message from a WebSocket client.void
StompSubProtocolHandler.handleMessageFromClient
(WebSocketSession session, WebSocketMessage<?> webSocketMessage, MessageChannel targetChannel) Handle incoming WebSocket messages from clients.void
SubProtocolHandler.handleMessageFromClient
(WebSocketSession session, WebSocketMessage<?> message, MessageChannel outputChannel) Handle the givenWebSocketMessage
received from a client.void
StompSubProtocolHandler.handleMessageToClient
(WebSocketSession session, Message<?> message) Handle STOMP messages going back out to WebSocket clients.void
SubProtocolHandler.handleMessageToClient
(WebSocketSession session, Message<?> message) Handle the givenMessage
to the client associated with the given WebSocket session.void
SubProtocolWebSocketHandler.handleTransportError
(WebSocketSession session, Throwable exception) -
Uses of WebSocketSession in org.springframework.web.socket.sockjs.client
Modifier and TypeClassDescriptionclass
Base class for SockJS client implementations ofWebSocketSession
.class
An extension ofAbstractClientSockJsSession
wrapping and delegating to an actual WebSocket session.class
An extension ofAbstractClientSockJsSession
for use with HTTP transports simulating a WebSocket session.Modifier and TypeMethodDescriptiondefault ListenableFuture<WebSocketSession>
Transport.connect
(TransportRequest request, WebSocketHandler webSocketHandler) Deprecated.as of 6.0, in favor ofTransport.connectAsync(TransportRequest, WebSocketHandler)
AbstractXhrTransport.connectAsync
(TransportRequest request, WebSocketHandler handler) Transport.connectAsync
(TransportRequest request, WebSocketHandler webSocketHandler) Connect the transport.WebSocketTransport.connectAsync
(TransportRequest request, WebSocketHandler handler) SockJsClient.execute
(WebSocketHandler handler, String uriTemplate, Object... uriVars) SockJsClient.execute
(WebSocketHandler handler, WebSocketHttpHeaders headers, URI url) Modifier and TypeMethodDescriptionvoid
WebSocketClientSockJsSession.initializeDelegateSession
(WebSocketSession session) Modifier and TypeMethodDescriptionprotected abstract void
AbstractXhrTransport.connectInternal
(TransportRequest request, WebSocketHandler handler, URI receiveUrl, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, CompletableFuture<WebSocketSession> connectFuture) protected void
AbstractXhrTransport.connectInternal
(TransportRequest request, WebSocketHandler handler, URI receiveUrl, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, SettableListenableFuture<WebSocketSession> connectFuture) Deprecated.protected void
JettyXhrTransport.connectInternal
(TransportRequest transportRequest, WebSocketHandler handler, URI url, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, CompletableFuture<WebSocketSession> connectFuture) protected void
RestTemplateXhrTransport.connectInternal
(TransportRequest transportRequest, WebSocketHandler handler, URI receiveUrl, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, CompletableFuture<WebSocketSession> connectFuture) protected void
UndertowXhrTransport.connectInternal
(TransportRequest request, WebSocketHandler handler, URI receiveUrl, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, CompletableFuture<WebSocketSession> connectFuture) ModifierConstructorDescriptionprotected
AbstractClientSockJsSession
(TransportRequest request, WebSocketHandler handler, CompletableFuture<WebSocketSession> connectFuture) protected
AbstractClientSockJsSession
(TransportRequest request, WebSocketHandler handler, SettableListenableFuture<WebSocketSession> connectFuture) Deprecated.as of 6.0, in favor ofAbstractClientSockJsSession(TransportRequest, WebSocketHandler, CompletableFuture)
WebSocketClientSockJsSession
(TransportRequest request, WebSocketHandler handler, CompletableFuture<WebSocketSession> connectFuture) WebSocketClientSockJsSession
(TransportRequest request, WebSocketHandler handler, SettableListenableFuture<WebSocketSession> connectFuture) Deprecated.as of 6.0, in favor ofWebSocketClientSockJsSession(TransportRequest, WebSocketHandler, CompletableFuture)
XhrClientSockJsSession
(TransportRequest request, WebSocketHandler handler, XhrTransport transport, CompletableFuture<WebSocketSession> connectFuture) Create a newXhrClientSockJsSession
.XhrClientSockJsSession
(TransportRequest request, WebSocketHandler handler, XhrTransport transport, SettableListenableFuture<WebSocketSession> connectFuture) Deprecated.as of 6.0, in favor ofXhrClientSockJsSession(TransportRequest, WebSocketHandler, XhrTransport, CompletableFuture)
-
Uses of WebSocketSession in org.springframework.web.socket.sockjs.transport
Modifier and TypeInterfaceDescriptioninterface
SockJS extension of Spring's standardWebSocketSession
. -
Uses of WebSocketSession in org.springframework.web.socket.sockjs.transport.handler
Modifier and TypeMethodDescriptionvoid
SockJsWebSocketHandler.afterConnectionClosed
(WebSocketSession wsSession, CloseStatus status) void
SockJsWebSocketHandler.afterConnectionEstablished
(WebSocketSession wsSession) void
SockJsWebSocketHandler.handleTextMessage
(WebSocketSession wsSession, TextMessage message) void
SockJsWebSocketHandler.handleTransportError
(WebSocketSession webSocketSession, Throwable exception) -
Uses of WebSocketSession in org.springframework.web.socket.sockjs.transport.session
Modifier and TypeClassDescriptionclass
An abstract base class for use with HTTP transport SockJS sessions.class
An abstract base class for SockJS sessions implementingSockJsSession
.class
A SockJS session for use with polling HTTP transports.class
A SockJS session for use with streaming HTTP transports.class
A SockJS session for use with the WebSocket transport.Modifier and TypeMethodDescriptionvoid
WebSocketServerSockJsSession.handleMessage
(TextMessage message, WebSocketSession wsSession) void
WebSocketServerSockJsSession.initializeDelegateSession
(WebSocketSession session)
WebSocketClient.execute(WebSocketHandler, String, Object...)