public class IntegrationMessageHeaderAccessor extends MessageHeaderAccessor
| Modifier and Type | Field and Description |
|---|---|
static String |
ACKNOWLEDGMENT_CALLBACK |
static String |
CLOSEABLE_RESOURCE |
static String |
CORRELATION_ID |
static String |
DELIVERY_ATTEMPT |
static String |
DUPLICATE_MESSAGE |
static String |
EXPIRATION_DATE |
static String |
PRIORITY |
static String |
ROUTING_SLIP |
static String |
SEQUENCE_DETAILS |
static String |
SEQUENCE_NUMBER |
static String |
SEQUENCE_SIZE |
static String |
SOURCE_DATA
Raw source message.
|
DEFAULT_CHARSET| Constructor and Description |
|---|
IntegrationMessageHeaderAccessor(Message<?> message) |
| Modifier and Type | Method and Description |
|---|---|
AcknowledgmentCallback |
getAcknowledgmentCallback()
Return the acknowledgment callback, if present.
|
Closeable |
getCloseableResource()
If the payload was created by a
Closeable that needs to remain
open until the payload is consumed, the resource will be added to this
header. |
Object |
getCorrelationId() |
AtomicInteger |
getDeliveryAttempt()
When a message-driven endpoint supports retry implicitly, this
header is incremented for each delivery attempt.
|
Long |
getExpirationDate() |
<T> T |
getHeader(String key,
Class<T> type) |
Integer |
getPriority() |
int |
getSequenceNumber() |
int |
getSequenceSize() |
<T> T |
getSourceData()
Get the source data header, if present.
|
boolean |
isReadOnly(String headerName) |
void |
setReadOnlyHeaders(String... readOnlyHeaders)
Specify a list of headers which should be considered as read only and prohibited
from being populated in the message.
|
Map<String,Object> |
toMap() |
protected void |
verifyType(String headerName,
Object headerValue) |
copyHeaders, copyHeadersIfAbsent, createAccessor, getAccessor, getAccessor, getContentType, getDetailedLogMessage, getDetailedPayloadLogMessage, getErrorChannel, getHeader, getId, getMessageHeaders, getMutableAccessor, getReplyChannel, getShortLogMessage, getShortPayloadLogMessage, getTimestamp, isModified, isMutable, isReadableContentType, removeHeader, removeHeaders, setContentType, setErrorChannel, setErrorChannelName, setHeader, setHeaderIfAbsent, setImmutable, setLeaveMutable, setModified, setReplyChannel, setReplyChannelName, toMessageHeaders, toStringpublic static final String CORRELATION_ID
public static final String EXPIRATION_DATE
public static final String PRIORITY
public static final String SEQUENCE_NUMBER
public static final String SEQUENCE_SIZE
public static final String SEQUENCE_DETAILS
public static final String ROUTING_SLIP
public static final String DUPLICATE_MESSAGE
public static final String CLOSEABLE_RESOURCE
public static final String DELIVERY_ATTEMPT
public static final String ACKNOWLEDGMENT_CALLBACK
public static final String SOURCE_DATA
public void setReadOnlyHeaders(String... readOnlyHeaders)
readOnlyHeaders - the list of headers for readOnly mode. Defaults to
MessageHeaders.ID and
MessageHeaders.TIMESTAMP.isReadOnly(String)public int getSequenceNumber()
public int getSequenceSize()
@Nullable public Closeable getCloseableResource()
Closeable that needs to remain
open until the payload is consumed, the resource will be added to this
header. After the payload is consumed the Closeable should be
closed. Usually this must occur in an endpoint close to the message
origin in the flow, and in the same JVM.Closeable.@Nullable public AcknowledgmentCallback getAcknowledgmentCallback()
@Nullable public AtomicInteger getDeliveryAttempt()
@Nullable public <T> T getSourceData()
T - the data type.protected void verifyType(String headerName, Object headerValue)
verifyType in class MessageHeaderAccessorpublic boolean isReadOnly(String headerName)
isReadOnly in class MessageHeaderAccessorpublic Map<String,Object> toMap()
toMap in class MessageHeaderAccessor