public class SessionConnectEvent
extends org.springframework.context.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,
org.springframework.messaging.Message<byte[]> message)
Create a new SessionConnectEvent.
|
| Modifier and Type | Method and Description |
|---|---|
org.springframework.messaging.Message<byte[]> |
getMessage()
Return the connect message.
|
String |
toString() |
getSourcepublic SessionConnectEvent(Object source, org.springframework.messaging.Message<byte[]> message)
source - the component that published the event (never null)message - the connect messagepublic org.springframework.messaging.Message<byte[]> getMessage()
public String toString()
toString in class EventObject