public abstract class AbstractSubProtocolEvent
extends org.springframework.context.ApplicationEvent
source
Modifier | Constructor and Description |
---|---|
protected |
AbstractSubProtocolEvent(Object source,
org.springframework.messaging.Message<byte[]> message)
Create a new AbstractSubProtocolEvent.
|
protected |
AbstractSubProtocolEvent(Object source,
org.springframework.messaging.Message<byte[]> message,
Principal user)
Create a new AbstractSubProtocolEvent.
|
Modifier and Type | Method and Description |
---|---|
org.springframework.messaging.Message<byte[]> |
getMessage()
Return the Message associated with the event.
|
Principal |
getUser()
Return the user for the session associated with the event.
|
String |
toString() |
getSource
protected AbstractSubProtocolEvent(Object source, org.springframework.messaging.Message<byte[]> message)
source
- the component that published the event (never null
)message
- the incoming message (never null
)protected AbstractSubProtocolEvent(Object source, org.springframework.messaging.Message<byte[]> message, @Nullable Principal user)
source
- the component that published the event (never null
)message
- the incoming message (never null
)public org.springframework.messaging.Message<byte[]> getMessage()
StompHeaderAccessor headers = StompHeaderAccessor.wrap(message); headers.getSessionId(); headers.getSessionAttributes(); headers.getPrincipal();
@Nullable public Principal getUser()
public String toString()
toString
in class EventObject