public class SessionDisconnectEvent extends AbstractSubProtocolEvent
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.
source
Constructor and Description |
---|
SessionDisconnectEvent(Object source,
Message<byte[]> message,
String sessionId,
CloseStatus closeStatus)
Create a new SessionDisconnectEvent.
|
SessionDisconnectEvent(Object source,
Message<byte[]> message,
String sessionId,
CloseStatus closeStatus,
Principal user)
Create a new SessionDisconnectEvent.
|
Modifier and Type | Method and Description |
---|---|
CloseStatus |
getCloseStatus()
Return the status with which the session was closed.
|
String |
getSessionId()
Return the session id.
|
String |
toString() |
getMessage, getUser
getTimestamp
getSource
public SessionDisconnectEvent(Object source, Message<byte[]> message, String sessionId, CloseStatus closeStatus)
source
- the component that published the event (never null
)message
- the message (never null
)sessionId
- the disconnect messagecloseStatus
- the status objectpublic SessionDisconnectEvent(Object source, Message<byte[]> message, String sessionId, CloseStatus closeStatus, @Nullable Principal user)
source
- the component that published the event (never null
)message
- the message (never null
)sessionId
- the disconnect messagecloseStatus
- the status objectuser
- the current session userpublic String getSessionId()
public CloseStatus getCloseStatus()
public String toString()
toString
in class AbstractSubProtocolEvent