- createAccessor
MessageHeaderAccessor createAccessor(MessageBase message)
Undocumented in source. Be warned that the author may not have intended to support it.
- getDestination
string getDestination()
Undocumented in source. Be warned that the author may not have intended to support it.
- getDetailedLogMessage
string getDetailedLogMessage(Object payload)
Undocumented in source. Be warned that the author may not have intended to support it.
- getMessageType
Nullable!SimpMessageType getMessageType()
Undocumented in source. Be warned that the author may not have intended to support it.
- getSessionAttributes
Map!(string, Object) getSessionAttributes()
Return the attributes associated with the current session.
- getSessionId
string getSessionId()
Return the id of the current session.
- getShortLogMessage
string getShortLogMessage(Object payload)
Return the user associated with the current session.
- getSubscriptionId
string getSubscriptionId()
Undocumented in source. Be warned that the author may not have intended to support it.
- setDestination
void setDestination(string destination)
Undocumented in source. Be warned that the author may not have intended to support it.
- setMessageTypeIfNotSet
void setMessageTypeIfNotSet(SimpMessageType messageType)
Undocumented in source. Be warned that the author may not have intended to support it.
- setSessionAttributes
void setSessionAttributes(Map!(string, Object) attributes)
A static alternative for access to the session attributes header.
- setSessionId
void setSessionId(int sessionId)
Undocumented in source. Be warned that the author may not have intended to support it.
- setSessionId
void setSessionId(string sessionId)
Undocumented in source. Be warned that the author may not have intended to support it.
- setSubscriptionId
void setSubscriptionId(string subscriptionId)
Undocumented in source. Be warned that the author may not have intended to support it.
- create
SimpMessageHeaderAccessor create()
Create an instance with
{@link hunt.stomp.simp.SimpMessageType} {@code MESSAGE}.
- create
SimpMessageHeaderAccessor create(SimpMessageType messageType)
Create an instance with the given
{@link hunt.stomp.simp.SimpMessageType}.
- getDestination
string getDestination(Map!(string, Object) headers)
Undocumented in source. Be warned that the author may not have intended to support it.
- getHeartbeat
long[] getHeartbeat(Map!(string, Object) headers)
Undocumented in source. Be warned that the author may not have intended to support it.
- getMessageType
Nullable!SimpMessageType getMessageType(Map!(string, Object) headers)
Undocumented in source. Be warned that the author may not have intended to support it.
- getSessionAttributes
Map!(string, Object) getSessionAttributes(Map!(string, Object) headers)
Undocumented in source. Be warned that the author may not have intended to support it.
- getSessionId
string getSessionId(Map!(string, Object) headers)
Undocumented in source. Be warned that the author may not have intended to support it.
- getSubscriptionId
string getSubscriptionId(Map!(string, Object) headers)
Undocumented in source. Be warned that the author may not have intended to support it.
- wrap
SimpMessageHeaderAccessor wrap(MessageBase message)
Create an instance from the payload and headers of the given Message.
- NATIVE_HEADERS
enum string NATIVE_HEADERS;
The header name used to store native headers.
- getNativeHeaders
MultiStringsMap getNativeHeaders()
Undocumented in source. Be warned that the author may not have intended to support it.
- toNativeHeaderMap
MultiStringsMap toNativeHeaderMap()
Return a copy of the native header values or an empty map.
- setImmutable
void setImmutable()
Undocumented in source. Be warned that the author may not have intended to support it.
- containsNativeHeader
bool containsNativeHeader(string headerName)
Whether the native header map contains the give header name.
- getNativeHeader
List!(string) getNativeHeader(string headerName)
Return all values for the specified native header.
or {@code null} if none.
- getFirstNativeHeader
string getFirstNativeHeader(string headerName)
Return the first value for the specified native header,
or {@code null} if none.
- setNativeHeader
void setNativeHeader(string name, string value)
Set the specified native header value replacing existing values.
- addNativeHeader
void addNativeHeader(string name, string value)
Add the specified native header value to existing values.
- addNativeHeaders
void addNativeHeaders(MultiValueMap!(string, string) headers)
Undocumented in source. Be warned that the author may not have intended to support it.
- removeNativeHeader
List!(string) removeNativeHeader(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
- getFirstNativeHeader
string getFirstNativeHeader(string headerName, Map!(string, Object) headers)
Undocumented in source. Be warned that the author may not have intended to support it.
A base class for working with message headers in simple messaging protocols that support basic messaging patterns. Provides uniform access to specific values common across protocols such as a destination, message type (e.g. publish, subscribe, etc), session id, and others.
<p>Use one of the static factory method in this class, then call getters and setters, and at the end if necessary call {@link #toMap()} to obtain the updated headers.
@author Rossen Stoyanchev @since 4.0