Class SnsNotificationConverter
java.lang.Object
io.awspring.cloud.sqs.support.converter.SnsNotificationConverter
- All Implemented Interfaces:
MessageConverter,SmartMessageConverter
Converter that extracts SNS notifications from SQS messages and creates
SnsNotification objects.- Since:
- 3.4.1
- Author:
- Damien Chomat
-
Constructor Summary
ConstructorsConstructorDescriptionSnsNotificationConverter(MessageConverter payloadConverter, tools.jackson.databind.json.JsonMapper jsonMapper) Creates a new converter with the given payload converter and JSON mapper. -
Method Summary
Modifier and TypeMethodDescriptionfromMessage(Message<?> message, Class<?> targetClass) fromMessage(Message<?> message, Class<?> targetClass, @Nullable Object conversionHint) Message<?> toMessage(Object payload, @Nullable MessageHeaders headers) Message<?> toMessage(Object payload, @Nullable MessageHeaders headers, @Nullable Object conversionHint)
-
Constructor Details
-
SnsNotificationConverter
public SnsNotificationConverter(MessageConverter payloadConverter, tools.jackson.databind.json.JsonMapper jsonMapper) Creates a new converter with the given payload converter and JSON mapper.- Parameters:
payloadConverter- the converter to use for the message payloadjsonMapper- the JSON mapper to use for parsing the SNS notification
-
-
Method Details
-
fromMessage
public Object fromMessage(Message<?> message, Class<?> targetClass, @Nullable Object conversionHint) - Specified by:
fromMessagein interfaceSmartMessageConverter
-
fromMessage
- Specified by:
fromMessagein interfaceMessageConverter
-
toMessage
- Specified by:
toMessagein interfaceMessageConverter
-
toMessage
public Message<?> toMessage(Object payload, @Nullable MessageHeaders headers, @Nullable Object conversionHint) - Specified by:
toMessagein interfaceSmartMessageConverter
-