Example usage for com.amazonaws.services.sns AmazonSNSAsyncClient AmazonSNSAsyncClient

List of usage examples for com.amazonaws.services.sns AmazonSNSAsyncClient AmazonSNSAsyncClient

Introduction

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

Prototype

@Deprecated
public AmazonSNSAsyncClient(AWSCredentialsProvider awsCredentialsProvider, ExecutorService executorService) 

Source Link

Document

Constructs a new asynchronous client to invoke service methods on Amazon SNS using the specified AWS account credentials provider and executor service.

Usage

From source file:com.carrotgarden.log4j.aws.sns.Appender.java

License:BSD License

/** instantiate amazon client */
protected boolean ensureAmazonClient() {

    try {/*  ww  w  .  j  a va2 s.  co  m*/

        final File file = new File(getCredentials());

        final AWSCredentials creds = new PropertiesCredentials(file);

        amazonClient = new AmazonSNSAsyncClient(creds, service);

        return true;

    } catch (final Exception e) {

        LogLog.error("sns: amazon client init failure", e);

        return false;

    }

}