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

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.

Author
Rossen Stoyanchev

Since
4.0.3

Constructors

<init>

SessionDisconnectEvent(source: Any, message: Message<ByteArray>, sessionId: String, closeStatus: CloseStatus)
SessionDisconnectEvent(source: Any, message: Message<ByteArray>, sessionId: String, closeStatus: CloseStatus, user: Principal)

Create a new SessionDisconnectEvent.

Functions

getCloseStatus

open fun getCloseStatus(): CloseStatus

Return the status with which the session was closed.

getSessionId

open fun getSessionId(): String

Return the session id.

toString

open fun toString(): String