Example usage for com.amazonaws.services.sns.model Topic Topic

List of usage examples for com.amazonaws.services.sns.model Topic Topic

Introduction

In this page you can find the example usage for com.amazonaws.services.sns.model Topic Topic.

Prototype

Topic

Source Link

Usage

From source file:eu.openg.aws.sns.internal.AmazonSNSFake.java

License:Apache License

private static Topic buildTopic(String arn) {
    return new Topic().withTopicArn(arn);
}

From source file:eu.openg.aws.sns.internal.AmazonSNSFake.java

License:Apache License

@Override
public CreateTopicResult createTopic(String name) {
    if (!authorized)
        throw newAuthorizationErrorException(name).build();
    if (!isValidTopicName(name))
        throw newInvalidParameterException(name).build();
    final Topic topic = new Topic().withTopicArn("arn:aws:sns:us-east-1:" + clientTokenId + ":" + name);
    topics.add(topic.getTopicArn());//ww w . j  a v a2s  .c om
    return new CreateTopicResult().withTopicArn(topic.getTopicArn());
}