Java org.springframework.messaging.support MessageHeaderAccessor fields, constructors, methods, implement or subclass

Example usage for Java org.springframework.messaging.support MessageHeaderAccessor fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.springframework.messaging.support MessageHeaderAccessor.

The text is from its open source code.

Constructor

MessageHeaderAccessor()
A constructor to create new headers.
MessageHeaderAccessor(@Nullable Message message)
A constructor accepting the headers of an existing message to copy.

Method

voidcopyHeaders(@Nullable Map headersToCopy)
Copy the name-value pairs from the provided Map.
MessageHeaderAccessorcreateAccessor(Message message)
Build a 'nested' accessor for the given message.
TgetAccessor(Message message, @Nullable Class requiredType)
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.
TgetAccessor(MessageHeaders messageHeaders, @Nullable Class requiredType)
A variation of #getAccessor(org.springframework.messaging.Message,Class) with a MessageHeaders instance instead of a Message .
ClassgetClass()
Returns the runtime class of this Object .
ObjectgetHeader(String headerName)
Retrieve the value for the header with the given name.
MessageHeadersgetMessageHeaders()
Return the underlying MessageHeaders instance.
MessageHeaderAccessorgetMutableAccessor(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.
StringgetShortLogMessage(Object payload)
Return a concise message for logging purposes.
booleanisMutable()
Whether the underlying headers can still be modified.
voidremoveHeader(String headerName)
Remove the value for the given header name.
voidsetHeader(String name, @Nullable Object value)
Set the value for the given header name.
voidsetHeaderIfAbsent(String name, Object value)
Set the value for the given header name only if the header name is not already associated with a value.
voidsetImmutable()
By default when #getMessageHeaders() is called, "this" MessageHeaderAccessor instance can no longer be used to modify the underlying message headers.
voidsetLeaveMutable(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.