Example usage for Java org.springframework.messaging.support MessageHeaderAccessor fields, constructors, methods, implement or subclass
The text is from its open source code.
MessageHeaderAccessor() A constructor to create new headers. | |
MessageHeaderAccessor(@Nullable Message> message) A constructor accepting the headers of an existing message to copy. |
void | copyHeaders(@Nullable Map Copy the name-value pairs from the provided Map. |
MessageHeaderAccessor | createAccessor(Message> message) Build a 'nested' accessor for the given message. |
T | getAccessor(Message> message, @Nullable Class Return the original MessageHeaderAccessor used to create the headers of the given Message , or null if that's not available or if its type does not match the required type. |
T | getAccessor(MessageHeaders messageHeaders, @Nullable Class A variation of #getAccessor(org.springframework.messaging.Message,Class) with a MessageHeaders instance instead of a Message . |
Class> | getClass() Returns the runtime class of this Object . |
Object | getHeader(String headerName) Retrieve the value for the header with the given name. |
MessageHeaders | getMessageHeaders() Return the underlying MessageHeaders instance. |
MessageHeaderAccessor | getMutableAccessor(Message> message) Return a mutable MessageHeaderAccessor for the given message attempting to match the type of accessor used to create the message headers, or otherwise wrapping the message with a MessageHeaderAccessor instance. |
String | getShortLogMessage(Object payload) Return a concise message for logging purposes. |
boolean | isMutable() Whether the underlying headers can still be modified. |
void | removeHeader(String headerName) Remove the value for the given header name. |
void | setHeader(String name, @Nullable Object value) Set the value for the given header name. |
void | setHeaderIfAbsent(String name, Object value) Set the value for the given header name only if the header name is not already associated with a value. |
void | setImmutable() By default when #getMessageHeaders() is called, "this" MessageHeaderAccessor instance can no longer be used to modify the underlying message headers. |
void | setLeaveMutable(boolean leaveMutable) By default when #getMessageHeaders() is called, "this" MessageHeaderAccessor instance can no longer be used to modify the underlying message headers and the returned MessageHeaders is immutable. |