Uses of Interface
org.springframework.web.socket.WebSocketHandler
Package
Description
Adapter classes for the Jetty WebSocket API.
Adapter classes for the standard Java WebSocket API.
Client-side abstractions for WebSocket applications.
Client-side support for the Jetty WebSocket API.
Client-side classes for use with standard Java WebSocket endpoints.
Support for annotation-based WebSocket setup in configuration classes.
Convenient
WebSocketHandler
implementations and decorators.WebSocket integration for Spring's messaging module.
Server-side abstractions for WebSocket interactions.
Server-side support for the Jetty 9+ WebSocket API.
Server-side classes for use with standard JSR-356 WebSocket endpoints.
Server-side support classes including container-specific strategies
for upgrading a request.
Top-level SockJS types.
SockJS client implementation of
WebSocketClient
.Support classes for SockJS including an
AbstractSockJsService
implementation.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 WebSocketHandler in org.springframework.web.socket.adapter.jetty
ModifierConstructorDescriptionJettyWebSocketHandlerAdapter
(WebSocketHandler webSocketHandler, JettyWebSocketSession wsSession) -
Uses of WebSocketHandler in org.springframework.web.socket.adapter.standard
ModifierConstructorDescriptionStandardWebSocketHandlerAdapter
(WebSocketHandler handler, StandardWebSocketSession wsSession) -
Uses of WebSocketHandler in org.springframework.web.socket.client
Modifier and TypeMethodDescriptionprotected WebSocketHandler
WebSocketConnectionManager.decorateWebSocketHandler
(WebSocketHandler handler) Decorate the WebSocketHandler provided to the class constructor.Modifier and TypeMethodDescriptionprotected WebSocketHandler
WebSocketConnectionManager.decorateWebSocketHandler
(WebSocketHandler handler) Decorate the WebSocketHandler provided to the class constructor.default 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.ModifierConstructorDescriptionWebSocketConnectionManager
(WebSocketClient client, WebSocketHandler webSocketHandler, String uriTemplate, Object... uriVariables) -
Uses of WebSocketHandler in org.springframework.web.socket.client.jetty
Modifier and TypeMethodDescriptionJettyWebSocketClient.executeInternal
(WebSocketHandler wsHandler, HttpHeaders headers, URI uri, List<String> protocols, List<WebSocketExtension> extensions, Map<String, Object> attributes) -
Uses of WebSocketHandler 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 WebSocketHandler in org.springframework.web.socket.config.annotation
Modifier and TypeMethodDescriptionprotected WebSocketHandler
WebSocketMessageBrokerConfigurationSupport.decorateWebSocketHandler
(WebSocketHandler handler) WebSocketMessageBrokerConfigurationSupport.subProtocolWebSocketHandler
(AbstractSubscribableChannel clientInboundChannel, AbstractSubscribableChannel clientOutboundChannel) Modifier and TypeMethodDescriptionAbstractWebSocketHandlerRegistration.addHandler
(WebSocketHandler handler, String... paths) ServletWebSocketHandlerRegistry.addHandler
(WebSocketHandler handler, String... paths) WebSocketHandlerRegistration.addHandler
(WebSocketHandler handler, String... paths) Add more handlers that will share the same configuration (interceptors, SockJS config, etc).WebSocketHandlerRegistry.addHandler
(WebSocketHandler webSocketHandler, String... paths) Configure a WebSocketHandler at the specified URL paths.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 abstract void
AbstractWebSocketHandlerRegistration.addWebSocketHandlerMapping
(M mappings, WebSocketHandler wsHandler, HandshakeHandler handshakeHandler, HandshakeInterceptor[] interceptors, String path) protected void
ServletWebSocketHandlerRegistration.addWebSocketHandlerMapping
(MultiValueMap<HttpRequestHandler, String> mappings, WebSocketHandler webSocketHandler, HandshakeHandler handshakeHandler, HandshakeInterceptor[] interceptors, String path) protected WebSocketHandler
WebSocketMessageBrokerConfigurationSupport.decorateWebSocketHandler
(WebSocketHandler handler) WebSocketMessageBrokerConfigurationSupport.stompWebSocketHandlerMapping
(WebSocketHandler subProtocolWebSocketHandler, TaskScheduler messageBrokerTaskScheduler) WebSocketMessageBrokerConfigurationSupport.webSocketMessageBrokerStats
(AbstractBrokerMessageHandler stompBrokerRelayMessageHandler, WebSocketHandler subProtocolWebSocketHandler, TaskExecutor inboundExecutor, TaskExecutor outboundExecutor, TaskScheduler scheduler) ModifierConstructorDescriptionWebMvcStompEndpointRegistry
(WebSocketHandler webSocketHandler, WebSocketTransportRegistration transportRegistration, TaskScheduler defaultSockJsTaskScheduler) WebMvcStompWebSocketEndpointRegistration
(String[] paths, WebSocketHandler webSocketHandler, TaskScheduler sockJsTaskScheduler) -
Uses of WebSocketHandler in org.springframework.web.socket.handler
Modifier and TypeClassDescriptionclass
A convenient base class forWebSocketHandler
implementation with empty methods.class
A convenient base class forWebSocketHandler
implementations that process binary messages only.class
An exception handlingWebSocketHandlerDecorator
.class
AWebSocketHandlerDecorator
that adds logging to WebSocket lifecycle events.class
AWebSocketHandler
that initializes and destroys aWebSocketHandler
instance for each WebSocket connection and delegates all other methods to it.class
A convenient base class forWebSocketHandler
implementations that process text messages only.class
Wraps anotherWebSocketHandler
instance and delegates to it.Modifier and TypeMethodDescriptionWebSocketHandlerDecoratorFactory.decorate
(WebSocketHandler handler) Decorate the given WebSocketHandler.WebSocketHandlerDecorator.getDelegate()
WebSocketHandlerDecorator.getLastHandler()
static WebSocketHandler
WebSocketHandlerDecorator.unwrap
(WebSocketHandler handler) Modifier and TypeMethodDescriptionWebSocketHandlerDecoratorFactory.decorate
(WebSocketHandler handler) Decorate the given WebSocketHandler.static WebSocketHandler
WebSocketHandlerDecorator.unwrap
(WebSocketHandler handler) ModifierConstructorDescriptionPerConnectionWebSocketHandler
(Class<? extends WebSocketHandler> handlerType) PerConnectionWebSocketHandler
(Class<? extends WebSocketHandler> handlerType, boolean supportsPartialMessages) -
Uses of WebSocketHandler in org.springframework.web.socket.messaging
Modifier and TypeClassDescriptionclass
An implementation ofWebSocketHandler
that delegates incoming WebSocket messages to aSubProtocolHandler
along with aMessageChannel
to which the sub-protocol handler can send messages from WebSocket clients to the application. -
Uses of WebSocketHandler in org.springframework.web.socket.server
Modifier and TypeMethodDescriptionvoid
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. -
Uses of WebSocketHandler in org.springframework.web.socket.server.jetty
Modifier and TypeMethodDescriptionvoid
JettyRequestUpgradeStrategy.upgrade
(ServerHttpRequest request, ServerHttpResponse response, String selectedProtocol, List<WebSocketExtension> selectedExtensions, Principal user, WebSocketHandler handler, Map<String, Object> attributes) -
Uses of WebSocketHandler in org.springframework.web.socket.server.standard
Modifier and TypeMethodDescriptionvoid
AbstractStandardUpgradeStrategy.upgrade
(ServerHttpRequest request, ServerHttpResponse response, String selectedProtocol, List<WebSocketExtension> selectedExtensions, Principal user, WebSocketHandler wsHandler, Map<String, Object> attrs) -
Uses of WebSocketHandler in org.springframework.web.socket.server.support
Modifier and TypeMethodDescriptionprotected WebSocketHandler
WebSocketHttpRequestHandler.decorate
(WebSocketHandler handler) Decorate theWebSocketHandler
passed into the constructor.WebSocketHttpRequestHandler.getWebSocketHandler()
Return the WebSocketHandler.Modifier and TypeMethodDescriptionvoid
HttpSessionHandshakeInterceptor.afterHandshake
(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Exception ex) void
OriginHandshakeInterceptor.afterHandshake
(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Exception exception) boolean
HttpSessionHandshakeInterceptor.beforeHandshake
(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Map<String, Object> attributes) boolean
OriginHandshakeInterceptor.beforeHandshake
(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Map<String, Object> attributes) protected WebSocketHandler
WebSocketHttpRequestHandler.decorate
(WebSocketHandler handler) Decorate theWebSocketHandler
passed into the constructor.AbstractHandshakeHandler.determineHandlerSupportedProtocols
(WebSocketHandler handler) Determine the sub-protocols supported by the given WebSocketHandler by checking whether it is an instance ofSubProtocolCapable
.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.final 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.ModifierConstructorDescriptionHandshakeInterceptorChain
(List<HandshakeInterceptor> interceptors, WebSocketHandler wsHandler) WebSocketHttpRequestHandler
(WebSocketHandler wsHandler) WebSocketHttpRequestHandler
(WebSocketHandler wsHandler, HandshakeHandler handshakeHandler) -
Uses of WebSocketHandler in org.springframework.web.socket.sockjs
Modifier and TypeMethodDescriptionvoid
SockJsService.handleRequest
(ServerHttpRequest request, ServerHttpResponse response, String sockJsPath, WebSocketHandler handler) Process a SockJS HTTP request. -
Uses of WebSocketHandler in org.springframework.web.socket.sockjs.client
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) protected 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) SockJsClient.execute
(WebSocketHandler handler, String uriTemplate, Object... uriVars) SockJsClient.execute
(WebSocketHandler handler, WebSocketHttpHeaders headers, URI url) 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 WebSocketHandler in org.springframework.web.socket.sockjs.support
Modifier and TypeMethodDescriptionSockJsHttpRequestHandler.getWebSocketHandler()
Return theWebSocketHandler
.Modifier and TypeMethodDescriptionprotected abstract void
AbstractSockJsService.handleRawWebSocketRequest
(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler webSocketHandler) Handle request for raw WebSocket communication, i.e.final 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.ModifierConstructorDescriptionSockJsHttpRequestHandler
(SockJsService sockJsService, WebSocketHandler webSocketHandler) Create a new SockJsHttpRequestHandler. -
Uses of WebSocketHandler in org.springframework.web.socket.sockjs.transport
Modifier and TypeMethodDescriptionSockJsSessionFactory.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 providedWebSocketHandler
.protected void
TransportHandlingSockJsService.handleTransportRequest
(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler handler, String sessionId, String transport) -
Uses of WebSocketHandler in org.springframework.web.socket.sockjs.transport.handler
Modifier and TypeClassDescriptionclass
An implementation ofWebSocketHandler
that adds SockJS messages frames, sends SockJS heartbeat messages, and delegates lifecycle events and messages to a targetWebSocketHandler
.Modifier and TypeMethodDescriptionEventSourceTransportHandler.createSession
(String sessionId, WebSocketHandler handler, Map<String, Object> attributes) HtmlFileTransportHandler.createSession
(String sessionId, WebSocketHandler handler, Map<String, Object> attributes) WebSocketTransportHandler.createSession
(String id, WebSocketHandler handler, Map<String, Object> attrs) XhrPollingTransportHandler.createSession
(String sessionId, WebSocketHandler handler, Map<String, Object> attributes) XhrStreamingTransportHandler.createSession
(String sessionId, WebSocketHandler handler, Map<String, Object> attributes) boolean
WebSocketTransportHandler.doHandshake
(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler handler, Map<String, Object> attributes) final void
AbstractHttpReceivingTransportHandler.handleRequest
(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, SockJsSession wsSession) final 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) ModifierConstructorDescriptionSockJsWebSocketHandler
(SockJsServiceConfig serviceConfig, WebSocketHandler webSocketHandler, WebSocketServerSockJsSession sockJsSession) -
Uses of WebSocketHandler in org.springframework.web.socket.sockjs.transport.session
ModifierConstructorDescriptionAbstractHttpSockJsSession
(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)
WebSocketClient.execute(WebSocketHandler, String, Object...)