Uses of Interface
org.springframework.web.socket.WebSocketHandler
Packages that use WebSocketHandler
Package
Description
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.
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 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
Constructors in org.springframework.web.socket.adapter.jetty with parameters of type WebSocketHandlerModifierConstructorDescriptionJettyWebSocketHandlerAdapter(WebSocketHandler webSocketHandler, JettyWebSocketSession wsSession) -
Uses of WebSocketHandler in org.springframework.web.socket.adapter.standard
Constructors in org.springframework.web.socket.adapter.standard with parameters of type WebSocketHandlerModifierConstructorDescriptionStandardWebSocketHandlerAdapter(WebSocketHandler handler, StandardWebSocketSession wsSession) -
Uses of WebSocketHandler in org.springframework.web.socket.client
Methods in org.springframework.web.socket.client that return WebSocketHandlerModifier and TypeMethodDescriptionprotected WebSocketHandlerWebSocketConnectionManager.decorateWebSocketHandler(WebSocketHandler handler) Decorate the WebSocketHandler provided to the class constructor.Methods in org.springframework.web.socket.client with parameters of type WebSocketHandlerModifier and TypeMethodDescriptionprotected WebSocketHandlerWebSocketConnectionManager.decorateWebSocketHandler(WebSocketHandler handler) Decorate the WebSocketHandler provided to the class constructor.AbstractWebSocketClient.execute(WebSocketHandler webSocketHandler, @Nullable WebSocketHttpHeaders headers, URI uri) AbstractWebSocketClient.execute(WebSocketHandler webSocketHandler, String uriTemplate, @Nullable Object... uriVars) WebSocketClient.execute(WebSocketHandler webSocketHandler, @Nullable WebSocketHttpHeaders headers, URI uri) Execute a handshake request to the given url and handle the resulting WebSocket session with the given handler.WebSocketClient.execute(WebSocketHandler webSocketHandler, String uriTemplate, @Nullable Object... uriVariables) 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.Constructors in org.springframework.web.socket.client with parameters of type WebSocketHandlerModifierConstructorDescriptionWebSocketConnectionManager(WebSocketClient client, WebSocketHandler webSocketHandler, String uriTemplate, @Nullable Object... uriVariables) Constructor with the client to use and a handler to handle messages with.WebSocketConnectionManager(WebSocketClient client, WebSocketHandler webSocketHandler, URI uri) Variant ofWebSocketConnectionManager(WebSocketClient, WebSocketHandler, String, Object...)with a preparedURI. -
Uses of WebSocketHandler in org.springframework.web.socket.client.standard
Methods in org.springframework.web.socket.client.standard with parameters of type WebSocketHandlerModifier 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
Methods in org.springframework.web.socket.config.annotation that return WebSocketHandlerModifier and TypeMethodDescriptionprotected WebSocketHandlerWebSocketMessageBrokerConfigurationSupport.decorateWebSocketHandler(WebSocketHandler handler) WebSocketMessageBrokerConfigurationSupport.subProtocolWebSocketHandler(AbstractSubscribableChannel clientInboundChannel, AbstractSubscribableChannel clientOutboundChannel) Methods in org.springframework.web.socket.config.annotation with parameters of type WebSocketHandlerModifier 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 voidAbstractWebSocketHandlerRegistration.addSockJsServiceMapping(M mappings, SockJsService sockJsService, WebSocketHandler handler, String pathPattern) protected voidServletWebSocketHandlerRegistration.addSockJsServiceMapping(MultiValueMap<HttpRequestHandler, String> mappings, SockJsService sockJsService, WebSocketHandler handler, String pathPattern) protected abstract voidAbstractWebSocketHandlerRegistration.addWebSocketHandlerMapping(M mappings, WebSocketHandler wsHandler, HandshakeHandler handshakeHandler, HandshakeInterceptor[] interceptors, String path) protected voidServletWebSocketHandlerRegistration.addWebSocketHandlerMapping(MultiValueMap<HttpRequestHandler, String> mappings, WebSocketHandler webSocketHandler, HandshakeHandler handshakeHandler, HandshakeInterceptor[] interceptors, String path) protected WebSocketHandlerWebSocketMessageBrokerConfigurationSupport.decorateWebSocketHandler(WebSocketHandler handler) WebSocketMessageBrokerConfigurationSupport.stompWebSocketHandlerMapping(WebSocketHandler subProtocolWebSocketHandler, TaskScheduler messageBrokerTaskScheduler, AbstractSubscribableChannel clientInboundChannel) WebSocketMessageBrokerConfigurationSupport.webSocketMessageBrokerStats(@Nullable AbstractBrokerMessageHandler stompBrokerRelayMessageHandler, WebSocketHandler subProtocolWebSocketHandler, TaskExecutor inboundExecutor, TaskExecutor outboundExecutor, TaskScheduler scheduler) Constructors in org.springframework.web.socket.config.annotation with parameters of type WebSocketHandlerModifierConstructorDescriptionWebMvcStompEndpointRegistry(WebSocketHandler webSocketHandler, WebSocketTransportRegistration transportRegistration, TaskScheduler defaultSockJsTaskScheduler) WebMvcStompWebSocketEndpointRegistration(String[] paths, WebSocketHandler webSocketHandler, TaskScheduler sockJsTaskScheduler) -
Uses of WebSocketHandler in org.springframework.web.socket.handler
Classes in org.springframework.web.socket.handler that implement WebSocketHandlerModifier and TypeClassDescriptionclassA convenient base class forWebSocketHandlerimplementation with empty methods.classA convenient base class forWebSocketHandlerimplementations that process binary messages only.classAn exception handlingWebSocketHandlerDecorator.classAWebSocketHandlerDecoratorthat adds logging to WebSocket lifecycle events.classAWebSocketHandlerthat initializes and destroys aWebSocketHandlerinstance for each WebSocket connection and delegates all other methods to it.classA convenient base class forWebSocketHandlerimplementations that process text messages only.classWraps anotherWebSocketHandlerinstance and delegates to it.Methods in org.springframework.web.socket.handler that return WebSocketHandlerModifier and TypeMethodDescriptionWebSocketHandlerDecoratorFactory.decorate(WebSocketHandler handler) Decorate the given WebSocketHandler.WebSocketHandlerDecorator.getDelegate()WebSocketHandlerDecorator.getLastHandler()static WebSocketHandlerWebSocketHandlerDecorator.unwrap(WebSocketHandler handler) Methods in org.springframework.web.socket.handler with parameters of type WebSocketHandlerModifier and TypeMethodDescriptionWebSocketHandlerDecoratorFactory.decorate(WebSocketHandler handler) Decorate the given WebSocketHandler.static WebSocketHandlerWebSocketHandlerDecorator.unwrap(WebSocketHandler handler) Constructors in org.springframework.web.socket.handler with parameters of type WebSocketHandlerConstructor parameters in org.springframework.web.socket.handler with type arguments of type WebSocketHandlerModifierConstructorDescriptionPerConnectionWebSocketHandler(Class<? extends WebSocketHandler> handlerType) PerConnectionWebSocketHandler(Class<? extends WebSocketHandler> handlerType, boolean supportsPartialMessages) -
Uses of WebSocketHandler in org.springframework.web.socket.messaging
Classes in org.springframework.web.socket.messaging that implement WebSocketHandlerModifier and TypeClassDescriptionclassAn implementation ofWebSocketHandlerthat delegates incoming WebSocket messages to aSubProtocolHandleralong with aMessageChannelto which the sub-protocol handler can send messages from WebSocket clients to the application. -
Uses of WebSocketHandler in org.springframework.web.socket.server
Methods in org.springframework.web.socket.server with parameters of type WebSocketHandlerModifier and TypeMethodDescriptionvoidHandshakeInterceptor.afterHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, @Nullable Exception exception) Invoked after the handshake is done.booleanHandshakeInterceptor.beforeHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Map<String, Object> attributes) Invoked before the handshake is processed.booleanHandshakeHandler.doHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Map<String, Object> attributes) Initiate the handshake.voidRequestUpgradeStrategy.upgrade(ServerHttpRequest request, ServerHttpResponse response, @Nullable String selectedProtocol, List<WebSocketExtension> selectedExtensions, @Nullable 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
Methods in org.springframework.web.socket.server.jetty with parameters of type WebSocketHandlerModifier and TypeMethodDescriptionvoidJettyRequestUpgradeStrategy.upgrade(ServerHttpRequest request, ServerHttpResponse response, @Nullable String selectedProtocol, List<WebSocketExtension> selectedExtensions, @Nullable Principal user, WebSocketHandler handler, Map<String, Object> attributes) -
Uses of WebSocketHandler in org.springframework.web.socket.server.standard
Methods in org.springframework.web.socket.server.standard with parameters of type WebSocketHandlerModifier and TypeMethodDescriptionvoidStandardWebSocketUpgradeStrategy.upgrade(ServerHttpRequest request, ServerHttpResponse response, @Nullable String selectedProtocol, List<WebSocketExtension> selectedExtensions, @Nullable Principal user, WebSocketHandler wsHandler, Map<String, Object> attrs) -
Uses of WebSocketHandler in org.springframework.web.socket.server.support
Methods in org.springframework.web.socket.server.support that return WebSocketHandlerModifier and TypeMethodDescriptionprotected WebSocketHandlerWebSocketHttpRequestHandler.decorate(WebSocketHandler handler) Decorate theWebSocketHandlerpassed into the constructor.WebSocketHttpRequestHandler.getWebSocketHandler()Return the WebSocketHandler.Methods in org.springframework.web.socket.server.support with parameters of type WebSocketHandlerModifier and TypeMethodDescriptionvoidHttpSessionHandshakeInterceptor.afterHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, @Nullable Exception ex) voidOriginHandshakeInterceptor.afterHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, @Nullable Exception exception) booleanHttpSessionHandshakeInterceptor.beforeHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Map<String, Object> attributes) booleanOriginHandshakeInterceptor.beforeHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Map<String, Object> attributes) protected WebSocketHandlerWebSocketHttpRequestHandler.decorate(WebSocketHandler handler) Decorate theWebSocketHandlerpassed into the constructor.AbstractHandshakeHandler.determineHandlerSupportedProtocols(WebSocketHandler handler) Determine the sub-protocols supported by the given WebSocketHandler by checking whether it is an instance ofSubProtocolCapable.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 booleanAbstractHandshakeHandler.doHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, Map<String, Object> attributes) AbstractHandshakeHandler.selectProtocol(List<String> requestedProtocols, WebSocketHandler webSocketHandler) Perform the sub-protocol negotiation based on requested and supported sub-protocols.Constructors in org.springframework.web.socket.server.support with parameters of type WebSocketHandlerModifierConstructorDescriptionHandshakeInterceptorChain(@Nullable List<HandshakeInterceptor> interceptors, WebSocketHandler wsHandler) WebSocketHttpRequestHandler(WebSocketHandler wsHandler) WebSocketHttpRequestHandler(WebSocketHandler wsHandler, HandshakeHandler handshakeHandler) -
Uses of WebSocketHandler in org.springframework.web.socket.sockjs
Methods in org.springframework.web.socket.sockjs with parameters of type WebSocketHandlerModifier and TypeMethodDescriptionvoidSockJsService.handleRequest(ServerHttpRequest request, ServerHttpResponse response, @Nullable String sockJsPath, WebSocketHandler handler) Process a SockJS HTTP request. -
Uses of WebSocketHandler in org.springframework.web.socket.sockjs.client
Methods in org.springframework.web.socket.sockjs.client that return WebSocketHandlerMethods in org.springframework.web.socket.sockjs.client with parameters of type WebSocketHandlerModifier and TypeMethodDescriptionAbstractXhrTransport.connectAsync(TransportRequest request, WebSocketHandler handler) Transport.connectAsync(TransportRequest request, WebSocketHandler webSocketHandler) Connect the transport.WebSocketTransport.connectAsync(TransportRequest request, WebSocketHandler handler) protected abstract voidAbstractXhrTransport.connectInternal(TransportRequest request, WebSocketHandler handler, URI receiveUrl, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, CompletableFuture<WebSocketSession> connectFuture) protected voidJettyXhrTransport.connectInternal(TransportRequest transportRequest, WebSocketHandler handler, URI url, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, CompletableFuture<WebSocketSession> connectFuture) protected voidRestTemplateXhrTransport.connectInternal(TransportRequest transportRequest, WebSocketHandler handler, URI receiveUrl, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, CompletableFuture<WebSocketSession> connectFuture) protected voidUndertowXhrTransport.connectInternal(TransportRequest request, WebSocketHandler handler, URI receiveUrl, HttpHeaders handshakeHeaders, XhrClientSockJsSession session, CompletableFuture<WebSocketSession> connectFuture) SockJsClient.execute(WebSocketHandler handler, @Nullable WebSocketHttpHeaders headers, URI url) SockJsClient.execute(WebSocketHandler handler, String uriTemplate, @Nullable Object... uriVars) Constructors in org.springframework.web.socket.sockjs.client with parameters of type WebSocketHandlerModifierConstructorDescriptionprotectedAbstractClientSockJsSession(TransportRequest request, WebSocketHandler handler, CompletableFuture<WebSocketSession> connectFuture) WebSocketClientSockJsSession(TransportRequest request, WebSocketHandler handler, CompletableFuture<WebSocketSession> connectFuture) XhrClientSockJsSession(TransportRequest request, WebSocketHandler handler, XhrTransport transport, CompletableFuture<WebSocketSession> connectFuture) Create a newXhrClientSockJsSession. -
Uses of WebSocketHandler in org.springframework.web.socket.sockjs.support
Methods in org.springframework.web.socket.sockjs.support that return WebSocketHandlerModifier and TypeMethodDescriptionSockJsHttpRequestHandler.getWebSocketHandler()Return theWebSocketHandler.Methods in org.springframework.web.socket.sockjs.support with parameters of type WebSocketHandlerModifier and TypeMethodDescriptionprotected abstract voidAbstractSockJsService.handleRawWebSocketRequest(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler webSocketHandler) Handle request for raw WebSocket communication, i.e.final voidAbstractSockJsService.handleRequest(ServerHttpRequest request, ServerHttpResponse response, @Nullable String sockJsPath, WebSocketHandler wsHandler) This method determines the SockJS path and handles SockJS static URLs.protected abstract voidAbstractSockJsService.handleTransportRequest(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler webSocketHandler, String sessionId, String transport) Handle a SockJS session URL (i.e.Constructors in org.springframework.web.socket.sockjs.support with parameters of type WebSocketHandlerModifierConstructorDescriptionSockJsHttpRequestHandler(SockJsService sockJsService, WebSocketHandler webSocketHandler) Create a new SockJsHttpRequestHandler. -
Uses of WebSocketHandler in org.springframework.web.socket.sockjs.transport
Methods in org.springframework.web.socket.sockjs.transport with parameters of type WebSocketHandlerModifier and TypeMethodDescriptionSockJsSessionFactory.createSession(String sessionId, WebSocketHandler handler, Map<String, Object> attributes) Create a new SockJS session.protected voidTransportHandlingSockJsService.handleRawWebSocketRequest(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler handler) voidTransportHandler.handleRequest(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler handler, SockJsSession session) Handle the given request and delegate messages to the providedWebSocketHandler.protected voidTransportHandlingSockJsService.handleTransportRequest(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler handler, String sessionId, String transport) -
Uses of WebSocketHandler in org.springframework.web.socket.sockjs.transport.handler
Classes in org.springframework.web.socket.sockjs.transport.handler that implement WebSocketHandlerModifier and TypeClassDescriptionclassAn implementation ofWebSocketHandlerthat adds SockJS messages frames, sends SockJS heartbeat messages, and delegates lifecycle events and messages to a targetWebSocketHandler.Methods in org.springframework.web.socket.sockjs.transport.handler with parameters of type WebSocketHandlerModifier 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) booleanWebSocketTransportHandler.doHandshake(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler handler, Map<String, Object> attributes) final voidAbstractHttpReceivingTransportHandler.handleRequest(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, SockJsSession wsSession) final voidAbstractHttpSendingTransportHandler.handleRequest(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, SockJsSession wsSession) voidWebSocketTransportHandler.handleRequest(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, SockJsSession wsSession) protected voidAbstractHttpReceivingTransportHandler.handleRequestInternal(ServerHttpRequest request, ServerHttpResponse response, WebSocketHandler wsHandler, AbstractHttpSockJsSession sockJsSession) Constructors in org.springframework.web.socket.sockjs.transport.handler with parameters of type WebSocketHandlerModifierConstructorDescriptionSockJsWebSocketHandler(SockJsServiceConfig serviceConfig, WebSocketHandler webSocketHandler, WebSocketServerSockJsSession sockJsSession) -
Uses of WebSocketHandler in org.springframework.web.socket.sockjs.transport.session
Constructors in org.springframework.web.socket.sockjs.transport.session with parameters of type WebSocketHandlerModifierConstructorDescriptionAbstractHttpSockJsSession(String id, SockJsServiceConfig config, WebSocketHandler wsHandler, Map<String, Object> attributes) AbstractSockJsSession(String id, SockJsServiceConfig config, WebSocketHandler handler, @Nullable 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, @Nullable Map<String, Object> attributes)