Use one of the static factory methods in this class, then call getters and setters,
and at the end if necessary call toMap() to obtain the updated headers.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | |
| public static final String | |
| public static final String | |
| private static final IdTimestampMessageHeaderInitializer | |
| public static final String | |
| public static final String | IGNORE_ERROR
A header that indicates to the broker that the sender will ignore errors. |
| public static final String | |
| public static final String | ORIGINAL_DESTINATION
A header for internal use with "user" destinations where we need to restore the destination prior to sending messages to clients. |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| private Consumer |
| Access | Constructor and Description |
|---|---|
| protected | SimpMessageHeaderAccessor(SimpMessageType messageType, Map<String, List<String>> externalSourceHeaders)
A constructor for creating new message headers. |
| protected | SimpMessageHeaderAccessor(Message<?> message)
A constructor for accessing and modifying existing message headers. |
| Modifier and Type | Method and Description |
|---|---|
| public static SimpMessageHeaderAccessor | |
| public static SimpMessageHeaderAccessor | create(SimpMessageType messageType)
Create an instance with the given
|
| protected MessageHeaderAccessor | createAccessor(Message<?>
the message to build a new accessor for message)Overrides org. Build a 'nested' accessor for the given message. |
| private StringBuilder | |
| public String | |
| public static String | |
| public String | getDetailedLogMessage(Object
the payload that corresponds to the headers. payload)Overrides org. Return a more detailed message for logging purposes. |
| public static long[] | |
| public SimpMessageType | |
| public static SimpMessageType | |
| public Map | |
| public static Map | |
| public String | |
| public static String | |
| public String | getShortLogMessage(Object
the payload that corresponds to the headers. payload)Overrides org. Return a concise message for logging purposes. |
| public String | |
| public static String | |
| public Principal | |
| public static Principal | |
| public void | |
| public void | |
| public void | setSessionAttributes(Map<String, Object> attributes)
A static alternative for access to the session attributes header. |
| public void | |
| public void | |
| public void | |
| public void | setUserChangeCallback(Consumer<Principal>
the callback to invoke callback)Provide a callback to be invoked if and when |
| public static SimpMessageHeaderAccessor |
| CONNECT_MESSAGE_HEADER | back to summary |
|---|---|
| public static final String CONNECT_MESSAGE_HEADER | |
| DESTINATION_HEADER | back to summary |
|---|---|
| public static final String DESTINATION_HEADER | |
| DISCONNECT_MESSAGE_HEADER | back to summary |
|---|---|
| public static final String DISCONNECT_MESSAGE_HEADER | |
| headerInitializer | back to summary |
|---|---|
| private static final IdTimestampMessageHeaderInitializer headerInitializer | |
| HEART_BEAT_HEADER | back to summary |
|---|---|
| public static final String HEART_BEAT_HEADER | |
| IGNORE_ERROR | back to summary |
|---|---|
| public static final String IGNORE_ERROR A header that indicates to the broker that the sender will ignore errors. The header is simply checked for presence or absence. | |
| MESSAGE_TYPE_HEADER | back to summary |
|---|---|
| public static final String MESSAGE_TYPE_HEADER | |
| ORIGINAL_DESTINATION | back to summary |
|---|---|
| public static final String ORIGINAL_DESTINATION A header for internal use with "user" destinations where we need to restore the destination prior to sending messages to clients. | |
| SESSION_ATTRIBUTES | back to summary |
|---|---|
| public static final String SESSION_ATTRIBUTES | |
| SESSION_ID_HEADER | back to summary |
|---|---|
| public static final String SESSION_ID_HEADER | |
| SUBSCRIPTION_ID_HEADER | back to summary |
|---|---|
| public static final String SUBSCRIPTION_ID_HEADER | |
| USER_HEADER | back to summary |
|---|---|
| public static final String USER_HEADER | |
| userCallback | back to summary |
|---|---|
| private Consumer<Principal> userCallback
| |
| SimpMessageHeaderAccessor | back to summary |
|---|---|
| protected SimpMessageHeaderAccessor(SimpMessageType messageType, Map<String, List<String>> externalSourceHeaders) A constructor for creating new message headers. This constructor is protected. See factory methods in this class and subclasses. | |
| SimpMessageHeaderAccessor | back to summary |
|---|---|
| protected SimpMessageHeaderAccessor(Message<?> message) A constructor for accessing and modifying existing message headers. This constructor is protected. See factory methods in this class and subclasses. | |
| create | back to summary |
|---|---|
| public static SimpMessageHeaderAccessor create() Create an instance with
| |
| create | back to summary |
|---|---|
| public static SimpMessageHeaderAccessor create(SimpMessageType messageType) Create an instance with the given
| |
| createAccessor | back to summary |
|---|---|
| protected MessageHeaderAccessor createAccessor(Message<?> message) Overrides org. Doc from org. Build a 'nested' accessor for the given message.
| |
| getBaseLogMessage | back to summary |
|---|---|
| private StringBuilder getBaseLogMessage() | |
| getDestination | back to summary |
|---|---|
public String getDestination()
| |
| getDestination | back to summary |
|---|---|
public static String getDestination(Map<String, Object> headers)
| |
| getDetailedLogMessage | back to summary |
|---|---|
| public String getDetailedLogMessage(Object payload) Overrides org. Doc from org. Return a more detailed message for logging purposes.
| |
| getHeartbeat | back to summary |
|---|---|
public static long[] getHeartbeat(Map<String, Object> headers)
| |
| getMessageType | back to summary |
|---|---|
public SimpMessageType getMessageType()
| |
| getMessageType | back to summary |
|---|---|
public static SimpMessageType getMessageType(Map<String, Object> headers)
| |
| getSessionAttributes | back to summary |
|---|---|
| public Map Return the attributes associated with the current session.
| |
| getSessionAttributes | back to summary |
|---|---|
public static Map
| |
| getSessionId | back to summary |
|---|---|
| public String getSessionId() Return the id of the current session.
| |
| getSessionId | back to summary |
|---|---|
public static String getSessionId(Map<String, Object> headers)
| |
| getShortLogMessage | back to summary |
|---|---|
| public String getShortLogMessage(Object payload) Overrides org. Doc from org. Return a concise message for logging purposes. | |
| getSubscriptionId | back to summary |
|---|---|
public String getSubscriptionId()
| |
| getSubscriptionId | back to summary |
|---|---|
public static String getSubscriptionId(Map<String, Object> headers)
| |
| getUser | back to summary |
|---|---|
| public Principal getUser() Return the user associated with the current session.
| |
| getUser | back to summary |
|---|---|
public static Principal getUser(Map<String, Object> headers)
| |
| setDestination | back to summary |
|---|---|
| public void setDestination(String destination) | |
| setMessageTypeIfNotSet | back to summary |
|---|---|
| public void setMessageTypeIfNotSet(SimpMessageType messageType) | |
| setSessionAttributes | back to summary |
|---|---|
| public void setSessionAttributes(Map<String, Object> attributes) A static alternative for access to the session attributes header. | |
| setSessionId | back to summary |
|---|---|
| public void setSessionId(String sessionId) | |
| setSubscriptionId | back to summary |
|---|---|
| public void setSubscriptionId(String subscriptionId) | |
| setUser | back to summary |
|---|---|
| public void setUser(Principal principal) | |
| setUserChangeCallback | back to summary |
|---|---|
| public void setUserChangeCallback(Consumer<Principal> callback) Provide a callback to be invoked if and when | |
| wrap | back to summary |
|---|---|
| public static SimpMessageHeaderAccessor wrap(Message<?> message) Create an instance by copying the headers of a Message. | |