public class TopicClient extends Object
| Constructor and Description |
|---|
TopicClient(com.amazonaws.services.sns.AmazonSNS sns,
com.fasterxml.jackson.databind.ObjectMapper objectMapper,
String topicArn) |
TopicClient(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
String topicArn)
Initializes client wrapper with the default SNS client.
|
| Modifier and Type | Method and Description |
|---|---|
com.amazonaws.services.sns.model.PublishResult |
publish(Object message)
Publishes message to associated SNS topic.
|
public TopicClient(com.fasterxml.jackson.databind.ObjectMapper objectMapper,
String topicArn)
This is a simplified version for AWS internal services, like AWS Lambda, which relies on environment permissions.
objectMapper - JSON handler.topicArn - SNS topic ARN.@ConstructorProperties(value={"sns","objectMapper","topicArn"}) @Generated(value="lombok") public TopicClient(com.amazonaws.services.sns.AmazonSNS sns, com.fasterxml.jackson.databind.ObjectMapper objectMapper, String topicArn)
public com.amazonaws.services.sns.model.PublishResult publish(Object message) throws com.fasterxml.jackson.core.JsonProcessingException
message - Message to publish (will always be serialized to JSON, even if it's plain string).com.fasterxml.jackson.core.JsonProcessingException - When message could not be serialized.Copyright © 2017–2018 RafaĆ Wrzeszcz - Wrzasq.pl. All rights reserved.