Class IntegrationMessageHeaderAccessor
java.lang.Object
org.springframework.messaging.support.MessageHeaderAccessor
org.springframework.integration.IntegrationMessageHeaderAccessor
Adds standard SI Headers.
- Since:
- 4.0
- Author:
- Andy Wilkinson, Artem Bilan, Gary Russell
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringA callback to acknowledge message delivery.static final Stringstatic final StringThe header for Control Bus command arguments.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringThe header forContextView.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringRaw source message.Fields inherited from class org.springframework.messaging.support.MessageHeaderAccessor
DEFAULT_CHARSET -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable AcknowledgmentCallbackReturn the acknowledgment callback, if present.@Nullable CloseableIf the payload was created by aCloseablethat needs to remain open until the payload is consumed, the resource will be added to this header.@Nullable Object@Nullable AtomicIntegerWhen a message-driven endpoint supports retry implicitly, this header is incremented for each delivery attempt.@Nullable Long<T> @Nullable T@Nullable Integer@Nullable reactor.util.context.ContextViewGet aContextViewheader if present.intint<T> @Nullable TGet the source data header, if present.booleanisReadOnly(String headerName) voidsetReadOnlyHeaders(String... readOnlyHeaders) Specify a list of headers which should be considered as read only and prohibited from being populated in the message.toMap()protected voidverifyType(@Nullable String headerName, @Nullable Object headerValue) Methods inherited from class org.springframework.messaging.support.MessageHeaderAccessor
copyHeaders, copyHeadersIfAbsent, createAccessor, fromMap, fromMessageHeaders, getAccessor, 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, toString
-
Field Details
-
CORRELATION_ID
- See Also:
-
EXPIRATION_DATE
- See Also:
-
PRIORITY
- See Also:
-
SEQUENCE_NUMBER
- See Also:
-
SEQUENCE_SIZE
- See Also:
-
SEQUENCE_DETAILS
- See Also:
-
ROUTING_SLIP
- See Also:
-
DUPLICATE_MESSAGE
- See Also:
-
CLOSEABLE_RESOURCE
- See Also:
-
DELIVERY_ATTEMPT
- See Also:
-
ACKNOWLEDGMENT_CALLBACK
A callback to acknowledge message delivery. The type of the header value depends on the context in which the header is used. See the reference manual for more information.- See Also:
-
SOURCE_DATA
-
REACTOR_CONTEXT
-
CONTROL_BUS_ARGUMENTS
The header for Control Bus command arguments. Must be a list of values.- See Also:
-
-
Constructor Details
-
IntegrationMessageHeaderAccessor
-
-
Method Details
-
setReadOnlyHeaders
Specify a list of headers which should be considered as read only and prohibited from being populated in the message.- Parameters:
readOnlyHeaders- the list of headers forreadOnlymode. Defaults toMessageHeaders.IDandMessageHeaders.TIMESTAMP.- Since:
- 4.3.2
- See Also:
-
getExpirationDate
-
getCorrelationId
-
getSequenceNumber
public int getSequenceNumber() -
getSequenceSize
public int getSequenceSize() -
getPriority
-
getCloseableResource
If the payload was created by aCloseablethat needs to remain open until the payload is consumed, the resource will be added to this header. After the payload is consumed theCloseableshould be closed. Usually this must occur in an endpoint close to the message origin in the flow, and in the same JVM.- Returns:
- the
Closeable. - Since:
- 4.3
-
getAcknowledgmentCallback
Return the acknowledgment callback, if present.- Returns:
- the callback.
- Since:
- 5.0.1
-
getDeliveryAttempt
When a message-driven endpoint supports retry implicitly, this header is incremented for each delivery attempt.- Returns:
- the delivery attempt.
- Since:
- 5.0.1
-
getSourceData
public <T> @Nullable T getSourceData()Get the source data header, if present.- Type Parameters:
T- the data type.- Returns:
- the source header.
- Since:
- 5.1.6
-
getReactorContext
public @Nullable reactor.util.context.ContextView getReactorContext()Get aContextViewheader if present.- Returns:
- the
ContextViewheader if present. - Since:
- 6.0.5
-
getHeader
-
verifyType
- Overrides:
verifyTypein classMessageHeaderAccessor
-
isReadOnly
- Overrides:
isReadOnlyin classMessageHeaderAccessor
-
toMap
- Overrides:
toMapin classMessageHeaderAccessor
-