Example usage for com.amazonaws.services.sqs AmazonSQSAsync setEndpoint

List of usage examples for com.amazonaws.services.sqs AmazonSQSAsync setEndpoint

Introduction

In this page you can find the example usage for com.amazonaws.services.sqs AmazonSQSAsync setEndpoint.

Prototype

@Deprecated
void setEndpoint(String endpoint);

Source Link

Document

Overrides the default endpoint for this client ("https://sqs.us-east-1.amazonaws.com").

Usage

From source file:com.aipo.aws.sqs.SQS.java

License:Open Source License

public static AmazonSQSAsync getAsyncClient() {
    AWSContext awsContext = AWSContext.get();
    if (awsContext == null) {
        throw new IllegalStateException("AWSContext is not initialized.");
    }/*w w  w .  ja  va 2 s .c o  m*/
    AmazonSQSAsync client = new AmazonSQSAsyncClient(awsContext.getAwsCredentials());
    String endpoint = awsContext.getSqsEndpoint();
    if (endpoint != null && endpoint != "") {
        client.setEndpoint(endpoint);
    }
    return client;
}