public class SessionConnectEvent extends ApplicationEvent
Note that this is not the same as the WebSocket session getting established but rather the client's first attempt to connect within the the sub-protocol, for example sending the STOMP CONNECT frame.
The provided message
can be examined to check
information about the connected user, The session id, and any headers
sent by the client, for STOMP check the class
StompHeaderAccessor
.
For example:
StompHeaderAccessor headers = StompHeaderAccessor.wrap(message); headers.getSessionId(); headers.getSessionAttributes(); headers.getPrincipal();
source
Constructor and Description |
---|
SessionConnectEvent(Object source,
Message<byte[]> message)
Create a new SessionConnectEvent.
|
Modifier and Type | Method and Description |
---|---|
Message<byte[]> |
getMessage()
Return the connect message.
|
String |
toString() |
getTimestamp
getSource
public Message<byte[]> getMessage()
public String toString()
toString
in class EventObject