Class AbstractMessageAttributesHeaderMapper<A>
java.lang.Object
org.springframework.integration.aws.support.AbstractMessageAttributesHeaderMapper<A>
- Type Parameters:
A
- the target message attribute type.
- Direct Known Subclasses:
SnsHeaderMapper
,SqsHeaderMapper
public abstract class AbstractMessageAttributesHeaderMapper<A>
extends Object
implements org.springframework.integration.mapping.HeaderMapper<Map<String,A>>
Base
HeaderMapper
implementation for common logic in SQS and SNS around message
attributes mapping.
The toHeaders(Map)
is not supported.
- Since:
- 2.0
- Author:
- Artem Bilan, Christopher Smith
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract A
buildMessageAttribute
(String dataType, Object value) void
fromHeaders
(org.springframework.messaging.MessageHeaders headers, Map<String, A> target) void
setOutboundHeaderNames
(String... outboundHeaderNames) Provide the header names that should be mapped to a AWS request object attributes (for outbound adapters) from a Spring Integration Message's headers.
-
Field Details
-
logger
protected final org.apache.commons.logging.Log logger
-
-
Constructor Details
-
AbstractMessageAttributesHeaderMapper
public AbstractMessageAttributesHeaderMapper()
-
-
Method Details
-
setOutboundHeaderNames
Provide the header names that should be mapped to a AWS request object attributes (for outbound adapters) from a Spring Integration Message's headers. The values can also contain simple wildcard patterns (e.g. "foo*" or "*foo") to be matched. Also supports negated ('!') patterns. First match wins (positive or negative). To match the names starting with!
symbol, you have to escape it prepending with the\
symbol in the pattern definition. Defaults to map all (*
) if the type is supported by SQS. TheMessageHeaders.ID
,MessageHeaders.TIMESTAMP
,NativeMessageHeaderAccessor.NATIVE_HEADERS
,AwsHeaders.MESSAGE_ID
,AwsHeaders.QUEUE
, andAwsHeaders.TOPIC
are ignored by default.- Parameters:
outboundHeaderNames
- The inbound header names.
-
fromHeaders
- Specified by:
fromHeaders
in interfaceorg.springframework.integration.mapping.HeaderMapper<A>
-
buildMessageAttribute
-
toHeaders
- Specified by:
toHeaders
in interfaceorg.springframework.integration.mapping.HeaderMapper<A>
-