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.AbstractWebSocketClient.doHandshake
(WebSocketHandler webSocketHandler, String uriTemplate, Object... uriVars) final ListenableFuture<WebSocketSession>
AbstractWebSocketClient.doHandshake
(WebSocketHandler webSocketHandler, WebSocketHttpHeaders headers, URI uri) WebSocketClient.doHandshake
(WebSocketHandler webSocketHandler, String uriTemplate, Object... uriVariables) 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.ModifierConstructorDescriptionWebSocketConnectionManager
(WebSocketClient client, WebSocketHandler webSocketHandler, String uriTemplate, Object... uriVariables) -
Uses of WebSocketHandler in org.springframework.web.socket.client.jetty
Modifier and TypeMethodDescriptionJettyWebSocketClient.doHandshake
(WebSocketHandler webSocketHandler, String uriTemplate, Object... uriVars) JettyWebSocketClient.doHandshakeInternal
(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 ListenableFuture<WebSocketSession>
StandardWebSocketClient.doHandshakeInternal
(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 clientInboundChannelExecutor, TaskExecutor clientOutboundChannelExecutor, TaskScheduler messageBrokerTaskScheduler) 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 TypeMethodDescriptionAbstractXhrTransport.connect
(TransportRequest request, WebSocketHandler handler) Transport.connect
(TransportRequest request, WebSocketHandler webSocketHandler) Connect the transport.WebSocketTransport.connect
(TransportRequest request, WebSocketHandler handler) protected abstract void
AbstractXhrTransport.connectInternal
(TransportRequest request, WebSocketHandler handler, URI receiveUrl, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, SettableListenableFuture<WebSocketSession> connectFuture) protected void
JettyXhrTransport.connectInternal
(TransportRequest transportRequest, WebSocketHandler handler, URI url, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, SettableListenableFuture<WebSocketSession> connectFuture) protected void
RestTemplateXhrTransport.connectInternal
(TransportRequest transportRequest, WebSocketHandler handler, URI receiveUrl, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, SettableListenableFuture<WebSocketSession> connectFuture) protected void
UndertowXhrTransport.connectInternal
(TransportRequest request, WebSocketHandler handler, URI receiveUrl, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, SettableListenableFuture<WebSocketSession> connectFuture) SockJsClient.doHandshake
(WebSocketHandler handler, String uriTemplate, Object... uriVars) final ListenableFuture<WebSocketSession>
SockJsClient.doHandshake
(WebSocketHandler handler, WebSocketHttpHeaders headers, URI url) ModifierConstructorDescriptionprotected
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) -
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)