List of usage examples for com.amazonaws.services.sns.model PublishResult PublishResult
PublishResult
From source file:eu.openg.aws.sns.internal.AmazonSNSFake.java
License:Apache License
@Override public PublishResult publish(String topicArn, String message) throws AmazonClientException { final SNSTopicArn arn = new SNSTopicArn(topicArn); if (!clientTokenId.equals(arn.getClientTokenId())) throw newAmazonServiceException("No account found for the given parameters", "InvalidClientTokenId", 403).build();/*from ww w.j av a 2 s . c om*/ if (!topics.contains(topicArn)) throw newNotFoundException("Topic does not exist").build(); return new PublishResult().withMessageId(randomUUID().toString()); }
From source file:org.apache.beam.sdk.io.aws.sns.PublishResultCoder.java
License:Apache License
@Override public PublishResult decode(InputStream inStream) throws CoderException, IOException { final String messageId = StringUtf8Coder.of().decode(inStream); return new PublishResult().withMessageId(messageId); }
From source file:org.apache.camel.component.aws.sns.AmazonSNSClientMock.java
License:Apache License
@Override public PublishResult publish(PublishRequest publishRequest) throws AmazonServiceException, AmazonClientException { PublishResult publishResult = new PublishResult(); publishResult.setMessageId("dcc8ce7a-7f18-4385-bedd-b97984b4363c"); return publishResult; }
From source file:org.finra.herd.dao.impl.MockSnsOperationsImpl.java
License:Apache License
@Override public PublishResult publish(String topicArn, String messageText, Map<String, MessageAttributeValue> messageAttributes, AmazonSNS amazonSNS) { // Nothing to do in the normal case since our unit tests aren't reading messages once they have been published. return new PublishResult().withMessageId(AbstractDaoTest.MESSAGE_ID); }