Class SnsHeaderMapper
java.lang.Object
io.awspring.cloud.sns.integration.SnsHeaderMapper
- All Implemented Interfaces:
org.springframework.integration.mapping.HeaderMapper<Map<String,software.amazon.awssdk.services.sns.model.MessageAttributeValue>>
public class SnsHeaderMapper
extends Object
implements org.springframework.integration.mapping.HeaderMapper<Map<String,software.amazon.awssdk.services.sns.model.MessageAttributeValue>>
The
HeaderMapper implementation for the mapping from headers to SNS message attributes.
On the Inbound side, the SNS message is fully mapped from the JSON to the message payload. Only important HTTP headers are mapped to the message headers.
- Since:
- 4.0
- Author:
- Artem Bilan
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidfromHeaders(MessageHeaders headers, Map<String, software.amazon.awssdk.services.sns.model.MessageAttributeValue> target) voidsetOutboundHeaderNames(String... outboundHeaderNames) Provide the header names that should be mapped to an AWS request object attributes (for outbound adapters) from a Spring Integration Message's headers.
-
Constructor Details
-
SnsHeaderMapper
public SnsHeaderMapper()
-
-
Method Details
-
setOutboundHeaderNames
Provide the header names that should be mapped to an 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 SNS. TheMessageHeaders.ID,MessageHeaders.TIMESTAMP,NativeMessageHeaderAccessor.NATIVE_HEADERS,invalid input: 'and {@link SnsHeaders#TOPIC_HEADER} are ignored by default. @param outboundHeaderNames The inbound header names.' -
fromHeaders
public void fromHeaders(MessageHeaders headers, Map<String, software.amazon.awssdk.services.sns.model.MessageAttributeValue> target) -
toHeaders
-