spring-framework / org.springframework.web.socket.messaging

Package org.springframework.web.socket.messaging

Types

SessionConnectEvent

open class SessionConnectEvent : AbstractSubProtocolEvent

Event raised when a new WebSocket client using a Simple Messaging Protocol (e.g. STOMP) as the WebSocket sub-protocol issues a connect request.

Note that this is not the same as the WebSocket session getting established but rather the client's first attempt to connect within the sub-protocol, for example sending the STOMP CONNECT frame.

SessionConnectedEvent

open class SessionConnectedEvent : AbstractSubProtocolEvent

A connected event represents the server response to a client's connect request. See org.springframework.web.socket.messaging.SessionConnectEvent.

SessionDisconnectEvent

open class SessionDisconnectEvent : AbstractSubProtocolEvent

Event raised when the session of a WebSocket client using a Simple Messaging Protocol (e.g. STOMP) as the WebSocket sub-protocol is closed.

Note that this event may be raised more than once for a single session and therefore event consumers should be idempotent and ignore a duplicate event.

SessionSubscribeEvent

open class SessionSubscribeEvent : AbstractSubProtocolEvent

Event raised when a new WebSocket client using a Simple Messaging Protocol (e.g. STOMP) sends a subscription request.

SessionUnsubscribeEvent

open class SessionUnsubscribeEvent : AbstractSubProtocolEvent

Event raised when a new WebSocket client using a Simple Messaging Protocol (e.g. STOMP) sends a request to remove a subscription.

SubProtocolErrorHandler

interface SubProtocolErrorHandler<P : Any>

A contract for handling sub-protocol errors sent to clients.

SubProtocolHandler

interface SubProtocolHandler

A contract for handling WebSocket messages as part of a higher level protocol, referred to as "sub-protocol" in the WebSocket RFC specification. Handles both WebSocketMessages from a client as well as Messages to a client.

Implementations of this interface can be configured on a SubProtocolWebSocketHandler which selects a sub-protocol handler to delegate messages to based on the sub-protocol requested by the client through the Sec-WebSocket-Protocol request header.

WebSocketAnnotationMethodMessageHandler

open class WebSocketAnnotationMethodMessageHandler : SimpAnnotationMethodMessageHandler

A sub-class of SimpAnnotationMethodMessageHandler to provide support for org.springframework.web.bind.annotation.ControllerAdvice with global @MessageExceptionHandler methods.

WebSocketStompClient

open class WebSocketStompClient : StompClientSupport, SmartLifecycle

A STOMP over WebSocket client that connects using an implementation of org.springframework.web.socket.client.WebSocketClient including org.springframework.web.socket.sockjs.client.SockJsClient.