public class IntegrationMessageHeaderAccessor extends MessageHeaderAccessor
| Modifier and Type | Field and Description |
|---|---|
static String |
CLOSEABLE_RESOURCE |
static String |
CORRELATION_ID |
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 |
DEFAULT_CHARSET| Constructor and Description |
|---|
IntegrationMessageHeaderAccessor(Message<?> message) |
| Modifier and Type | Method and Description |
|---|---|
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() |
Long |
getExpirationDate() |
<T> T |
getHeader(String key,
Class<T> type) |
Integer |
getPriority() |
Integer |
getSequenceNumber() |
Integer |
getSequenceSize() |
protected 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.
|
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, toMap, 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 IntegrationMessageHeaderAccessor(Message<?> message)
public void setReadOnlyHeaders(String... readOnlyHeaders)
readOnlyHeaders - the list of headers for readOnly mode.
Defaults to MessageHeaders.ID and MessageHeaders.TIMESTAMP.isReadOnly(String)public Long getExpirationDate()
public Object getCorrelationId()
public Integer getSequenceNumber()
public Integer getSequenceSize()
public Integer getPriority()
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.protected void verifyType(String headerName, Object headerValue)
verifyType in class MessageHeaderAccessorprotected boolean isReadOnly(String headerName)
isReadOnly in class MessageHeaderAccessor