MessageHeaderAccessor to use when creating a Message from
a decoded STOMP frame, or when encoding a Message to a STOMP frame.
When created from STOMP frame content, the actual STOMP headers are
stored in the native header sub-map managed by the parent class
org.
while the parent class SimpMessageHeaderAccessor manages common
processing headers some of which are based on STOMP headers
(e.g. destination, content-type, etc).
An instance of this class can also be created by wrapping an existing
Message. That message may have been created with the more generic
org. in
which case STOMP headers are created from common processing headers.
In this case it is also necessary to invoke either
updateStompCommandAsClientMessage() or
updateStompCommandAsServerMessage() if sending a message and
depending on whether a message is sent to a client or the message broker.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private static final String | |
| private static final long[] | |
| private static final AtomicLong | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String | |
| public static final String |
| Access | Constructor and Description |
|---|---|
| pack-priv | StompHeaderAccessor(StompCommand command, Map<String, List<String>> externalSourceHeaders)
A constructor for creating message headers from a parsed STOMP frame. |
| pack-priv | StompHeaderAccessor(Message<?> message)
A constructor for accessing and modifying existing message headers. |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private String | |
| private String | |
| public static StompHeaderAccessor | |
| public static StompHeaderAccessor | |
| protected MessageHeaderAccessor | createAccessor(Message<?>
the message to build a new accessor for message)Overrides org. |
| public static StompHeaderAccessor | |
| public Set | |
| public String | |
| public StompCommand | |
| public static StompCommand | getCommand(Map<String, Object> headers)
Return the STOMP command from the given headers, or |
| public Integer | |
| public static Integer | |
| public String | getDetailedLogMessage(Object
the payload that corresponds to the headers. payload)Overrides org. |
| public long[] | |
| public String | |
| public String | |
| public String | |
| public String | |
| public String | |
| protected Map | getNativeHeaders()
Overrides org. |
| public String | |
| public static String | |
| public String | |
| public String | |
| public String | getShortLogMessage(Object
the payload that corresponds to the headers. payload)Overrides org. |
| public String | |
| public boolean | |
| private void | |
| public void | |
| public void | |
| public void | |
| public void | setContentType(MimeType contentType)
Overrides org. |
| public void | setDestination(String destination)
Overrides org. |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | |
| public void | setSubscriptionId(String subscriptionId)
Overrides org. |
| public void | |
| private void | |
| pack-priv void | |
| public StompCommand | |
| public void | |
| pack-priv void | |
| public static StompHeaderAccessor | wrap(Message<?> message)
Hides org. |
| COMMAND_HEADER | back to summary |
|---|---|
| private static final String COMMAND_HEADER | |
| CREDENTIALS_HEADER | back to summary |
|---|---|
| private static final String CREDENTIALS_HEADER | |
| DEFAULT_HEARTBEAT | back to summary |
|---|---|
| private static final long[] DEFAULT_HEARTBEAT | |
| messageIdCounter | back to summary |
|---|---|
| private static final AtomicLong messageIdCounter | |
| STOMP_ACCEPT_VERSION_HEADER | back to summary |
|---|---|
| public static final String STOMP_ACCEPT_VERSION_HEADER | |
| STOMP_ACK_HEADER | back to summary |
|---|---|
| public static final String STOMP_ACK_HEADER | |
| STOMP_CONTENT_LENGTH_HEADER | back to summary |
|---|---|
| public static final String STOMP_CONTENT_LENGTH_HEADER | |
| STOMP_CONTENT_TYPE_HEADER | back to summary |
|---|---|
| public static final String STOMP_CONTENT_TYPE_HEADER | |
| STOMP_DESTINATION_HEADER | back to summary |
|---|---|
| public static final String STOMP_DESTINATION_HEADER | |
| STOMP_HEARTBEAT_HEADER | back to summary |
|---|---|
| public static final String STOMP_HEARTBEAT_HEADER | |
| STOMP_HOST_HEADER | back to summary |
|---|---|
| public static final String STOMP_HOST_HEADER | |
| STOMP_ID_HEADER | back to summary |
|---|---|
| public static final String STOMP_ID_HEADER | |
| STOMP_LOGIN_HEADER | back to summary |
|---|---|
| public static final String STOMP_LOGIN_HEADER | |
| STOMP_MESSAGE_HEADER | back to summary |
|---|---|
| public static final String STOMP_MESSAGE_HEADER | |
| STOMP_MESSAGE_ID_HEADER | back to summary |
|---|---|
| public static final String STOMP_MESSAGE_ID_HEADER | |
| STOMP_NACK_HEADER | back to summary |
|---|---|
| public static final String STOMP_NACK_HEADER | |
| STOMP_PASSCODE_HEADER | back to summary |
|---|---|
| public static final String STOMP_PASSCODE_HEADER | |
| STOMP_RECEIPT_HEADER | back to summary |
|---|---|
| public static final String STOMP_RECEIPT_HEADER | |
| STOMP_RECEIPT_ID_HEADER | back to summary |
|---|---|
| public static final String STOMP_RECEIPT_ID_HEADER | |
| STOMP_SUBSCRIPTION_HEADER | back to summary |
|---|---|
| public static final String STOMP_SUBSCRIPTION_HEADER | |
| STOMP_VERSION_HEADER | back to summary |
|---|---|
| public static final String STOMP_VERSION_HEADER | |
| StompHeaderAccessor | back to summary |
|---|---|
| pack-priv StompHeaderAccessor(StompCommand command, Map<String, List<String>> externalSourceHeaders) A constructor for creating message headers from a parsed STOMP frame. | |
| StompHeaderAccessor | back to summary |
|---|---|
| pack-priv StompHeaderAccessor(Message<?> message) A constructor for accessing and modifying existing message headers.
Note that the message headers may not have been created from a STOMP frame
but may have rather originated from using the more generic
| |
| StompHeaderAccessor | back to summary |
|---|---|
| pack-priv StompHeaderAccessor() | |
| appendPayload | back to summary |
|---|---|
| private String appendPayload(Object payload) | |
| appendSession | back to summary |
|---|---|
| private String appendSession() | |
| create | back to summary |
|---|---|
| public static StompHeaderAccessor create(StompCommand command) Create an instance for the given STOMP command. | |
| create | back to summary |
|---|---|
| public static StompHeaderAccessor create(StompCommand command, Map<String, List<String>> headers) Create an instance for the given STOMP command and headers. | |
| createAccessor | back to summary |
|---|---|
| protected MessageHeaderAccessor createAccessor(Message<?> message) Overrides org. Doc from org. Build a 'nested' accessor for the given message.
| |
| createForHeartbeat | back to summary |
|---|---|
| public static StompHeaderAccessor createForHeartbeat() Create headers for a heartbeat. While a STOMP heartbeat frame does not have headers, a session id is needed for processing purposes at a minimum. | |
| getAcceptVersion | back to summary |
|---|---|
| public Set | |
| getAck | back to summary |
|---|---|
public String getAck()
| |
| getCommand | back to summary |
|---|---|
| public StompCommand getCommand() Return the STOMP command, or
| |
| getCommand | back to summary |
|---|---|
| public static StompCommand getCommand(Map<String, Object> headers) Return the STOMP command from the given headers, or
| |
| getContentLength | back to summary |
|---|---|
public Integer getContentLength()
| |
| getContentLength | back to summary |
|---|---|
public static Integer getContentLength(Map<String, List<String>> nativeHeaders)
| |
| 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 long[] getHeartbeat() | |
| getHost | back to summary |
|---|---|
public String getHost()
| |
| getLogin | back to summary |
|---|---|
public String getLogin()
| |
| getMessage | back to summary |
|---|---|
public String getMessage()
| |
| getMessageId | back to summary |
|---|---|
public String getMessageId()
| |
| getNack | back to summary |
|---|---|
public String getNack()
| |
| getNativeHeaders | back to summary |
|---|---|
| protected Map Overrides org. Doc from org. Subclasses can use this method to access the "native" headers sub-map. | |
| getPasscode | back to summary |
|---|---|
| public String getPasscode() Return the passcode header value, or
| |
| getPasscode | back to summary |
|---|---|
| public static String getPasscode(Map<String, Object> headers) Return the passcode header value, or
| |
| getReceipt | back to summary |
|---|---|
public String getReceipt()
| |
| getReceiptId | back to summary |
|---|---|
public String getReceiptId()
| |
| getShortLogMessage | back to summary |
|---|---|
| public String getShortLogMessage(Object payload) Overrides org. Doc from org. Return a concise message for logging purposes. | |
| getVersion | back to summary |
|---|---|
public String getVersion()
| |
| isHeartbeat | back to summary |
|---|---|
| public boolean isHeartbeat() | |
| protectPasscode | back to summary |
|---|---|
| private void protectPasscode() | |
| setAcceptVersion | back to summary |
|---|---|
| public void setAcceptVersion(String acceptVersion) | |
| setAck | back to summary |
|---|---|
| public void setAck(String ack) | |
| setContentLength | back to summary |
|---|---|
| public void setContentLength(int contentLength) | |
| setContentType | back to summary |
|---|---|
| public void setContentType(MimeType contentType) Overrides org.
| |
| setDestination | back to summary |
|---|---|
| public void setDestination(String destination) Overrides org.
| |
| setHeartbeat | back to summary |
|---|---|
| public void setHeartbeat(long cx, long cy) | |
| setHost | back to summary |
|---|---|
| public void setHost(String host) | |
| setLogin | back to summary |
|---|---|
| public void setLogin(String login) | |
| setMessage | back to summary |
|---|---|
| public void setMessage(String content) | |
| setMessageId | back to summary |
|---|---|
| public void setMessageId(String id) | |
| setNack | back to summary |
|---|---|
| public void setNack(String nack) | |
| setPasscode | back to summary |
|---|---|
| public void setPasscode(String passcode) | |
| setReceipt | back to summary |
|---|---|
| public void setReceipt(String receiptId) | |
| setReceiptId | back to summary |
|---|---|
| public void setReceiptId(String receiptId) | |
| setSubscriptionId | back to summary |
|---|---|
| public void setSubscriptionId(String subscriptionId) Overrides org.
| |
| setVersion | back to summary |
|---|---|
| public void setVersion(String version) | |
| trySetStompHeaderForSubscriptionId | back to summary |
|---|---|
| private void trySetStompHeaderForSubscriptionId() | |
| updateSimpMessageHeadersFromStompHeaders | back to summary |
|---|---|
| pack-priv void updateSimpMessageHeadersFromStompHeaders() | |
| updateStompCommandAsClientMessage | back to summary |
|---|---|
| public StompCommand updateStompCommandAsClientMessage() | |
| updateStompCommandAsServerMessage | back to summary |
|---|---|
| public void updateStompCommandAsServerMessage() | |
| updateStompHeadersFromSimpMessageHeaders | back to summary |
|---|---|
| pack-priv void updateStompHeadersFromSimpMessageHeaders() | |
| wrap | back to summary |
|---|---|
| public static StompHeaderAccessor wrap(Message<?> message) Hides org. Create an instance from the payload and headers of the given Message. | |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public String |
| passcode | back to summary |
|---|---|
| private final String passcode | |
| StompPasscode | back to summary |
|---|---|
| public StompPasscode(String passcode) | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |