public class IntegrationMessageHeaderAccessor
extends org.springframework.messaging.support.MessageHeaderAccessor
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ACKNOWLEDGMENT_CALLBACK
A callback to acknowledge message delivery.
|
static java.lang.String |
CLOSEABLE_RESOURCE |
static java.lang.String |
CORRELATION_ID |
static java.lang.String |
DELIVERY_ATTEMPT |
static java.lang.String |
DUPLICATE_MESSAGE |
static java.lang.String |
EXPIRATION_DATE |
static java.lang.String |
PRIORITY |
static java.lang.String |
ROUTING_SLIP |
static java.lang.String |
SEQUENCE_DETAILS |
static java.lang.String |
SEQUENCE_NUMBER |
static java.lang.String |
SEQUENCE_SIZE |
static java.lang.String |
SOURCE_DATA
Raw source message.
|
| Constructor and Description |
|---|
IntegrationMessageHeaderAccessor(org.springframework.messaging.Message<?> message) |
| Modifier and Type | Method and Description |
|---|---|
AcknowledgmentCallback |
getAcknowledgmentCallback()
Return the acknowledgment callback, if present.
|
java.io.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. |
java.lang.Object |
getCorrelationId() |
java.util.concurrent.atomic.AtomicInteger |
getDeliveryAttempt()
When a message-driven endpoint supports retry implicitly, this
header is incremented for each delivery attempt.
|
java.lang.Long |
getExpirationDate() |
<T> T |
getHeader(java.lang.String key,
java.lang.Class<T> type) |
java.lang.Integer |
getPriority() |
int |
getSequenceNumber() |
int |
getSequenceSize() |
<T> T |
getSourceData()
Get the source data header, if present.
|
boolean |
isReadOnly(java.lang.String headerName) |
void |
setReadOnlyHeaders(java.lang.String... readOnlyHeaders)
Specify a list of headers which should be considered as read only and prohibited
from being populated in the message.
|
java.util.Map<java.lang.String,java.lang.Object> |
toMap() |
protected void |
verifyType(java.lang.String headerName,
java.lang.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 java.lang.String CORRELATION_ID
public static final java.lang.String EXPIRATION_DATE
public static final java.lang.String PRIORITY
public static final java.lang.String SEQUENCE_NUMBER
public static final java.lang.String SEQUENCE_SIZE
public static final java.lang.String SEQUENCE_DETAILS
public static final java.lang.String ROUTING_SLIP
public static final java.lang.String DUPLICATE_MESSAGE
public static final java.lang.String CLOSEABLE_RESOURCE
public static final java.lang.String DELIVERY_ATTEMPT
public static final java.lang.String ACKNOWLEDGMENT_CALLBACK
public static final java.lang.String SOURCE_DATA
public IntegrationMessageHeaderAccessor(@Nullable
org.springframework.messaging.Message<?> message)
public void setReadOnlyHeaders(java.lang.String... readOnlyHeaders)
readOnlyHeaders - the list of headers for readOnly mode. Defaults to
MessageHeaders.ID and
MessageHeaders.TIMESTAMP.isReadOnly(String)@Nullable public java.lang.Long getExpirationDate()
@Nullable public java.lang.Object getCorrelationId()
public int getSequenceNumber()
public int getSequenceSize()
@Nullable public java.lang.Integer getPriority()
@Nullable public java.io.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 java.util.concurrent.atomic.AtomicInteger getDeliveryAttempt()
@Nullable public <T> T getSourceData()
T - the data type.@Nullable
public <T> T getHeader(java.lang.String key,
java.lang.Class<T> type)
protected void verifyType(java.lang.String headerName,
java.lang.Object headerValue)
verifyType in class org.springframework.messaging.support.MessageHeaderAccessorpublic boolean isReadOnly(java.lang.String headerName)
isReadOnly in class org.springframework.messaging.support.MessageHeaderAccessorpublic java.util.Map<java.lang.String,java.lang.Object> toMap()
toMap in class org.springframework.messaging.support.MessageHeaderAccessor