Package com.amazonaws.services.sns

Examples of com.amazonaws.services.sns.AmazonSNS


     *
     * @return AmazonSNSClient
     */
    AmazonSNS createSNSClient() {
        AWSCredentials credentials = new BasicAWSCredentials(configuration.getAccessKey(), configuration.getSecretKey());
        AmazonSNS client = new AmazonSNSClient(credentials);
        if (configuration.getAmazonSNSEndpoint() != null) {
            client.setEndpoint(configuration.getAmazonSNSEndpoint());
        }
        return client;
    }
View Full Code Here


     *
     * @return AmazonSNSClient
     */
    AmazonSNS createSNSClient() {
        AWSCredentials credentials = new BasicAWSCredentials(configuration.getAccessKey(), configuration.getSecretKey());
        AmazonSNS client = new AmazonSNSClient(credentials);
        return client;
    }
View Full Code Here

        // prepare the credentials
        String accessKey = Constants.ACCESS_KEY;
        String secretKey = Constants.SECRET_KEY;

        // create the SNS service
        AmazonSNS snsService = new AmazonSNSClient(
            new BasicAWSCredentials(accessKey, secretKey));

        // XXX SET TO THE PREFERRED REGION
        // set the endpoint for us-east-1 region
        snsService.setEndpoint("https://sns.us-east-1.amazonaws.com");

        new SNSExamples().run(snsService);
   
    }
View Full Code Here

        String secretKey = Constants.SECRET_KEY;
        AWSCredentials credentials = new BasicAWSCredentials(accessKey,
                secretKey);

        // get the SNS service
        AmazonSNS sns = new AmazonSNSClient(credentials);

        String nextToken = null;
        int subscriptions = 0;
        do { // call service ListSubscriptionsByTopic
            ListSubscriptionsByTopicResult result = sns
                    .listSubscriptionsByTopic(new ListSubscriptionsByTopicRequest(
                            Constants.AN_SNS_TOPIC).withNextToken(nextToken));
            nextToken = result.getNextToken();
            // show the subscriptions
            for (Subscription subscription : result.getSubscriptions()) {
View Full Code Here

TOP

Related Classes of com.amazonaws.services.sns.AmazonSNS

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.