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

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

Introduction

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

Prototype

@Deprecated
void setRegion(Region region);

Source Link

Document

An alternative to AmazonSNS#setEndpoint(String) , sets the regional endpoint for this client's service calls.

Usage

From source file:org.apache.usergrid.persistence.queue.impl.SNSQueueManagerImpl.java

License:Apache License

/**
 * The Asynchronous SNS client is used for publishing events to SNS.
 *///w ww . j  av a  2s.c om

private AmazonSNSAsyncClient createAsyncSNSClient(final Region region, final ExecutorService executor) {

    final UsergridAwsCredentialsProvider ugProvider = new UsergridAwsCredentialsProvider();
    final AmazonSNSAsyncClient sns = new AmazonSNSAsyncClient(ugProvider.getCredentials(), clientConfiguration,
            executor);

    sns.setRegion(region);

    return sns;
}