Example usage for com.amazonaws.services.simpledb AmazonSimpleDBClient AmazonSimpleDBClient

List of usage examples for com.amazonaws.services.simpledb AmazonSimpleDBClient AmazonSimpleDBClient

Introduction

In this page you can find the example usage for com.amazonaws.services.simpledb AmazonSimpleDBClient AmazonSimpleDBClient.

Prototype

AmazonSimpleDBClient(AwsSyncClientParams clientParams, boolean endpointDiscoveryEnabled) 

Source Link

Document

Constructs a new client to invoke service methods on Amazon SimpleDB using the specified parameters.

Usage

From source file:com.netflix.ice.common.AwsUtils.java

License:Apache License

public static AmazonSimpleDBClient getAmazonSimpleDBClient() {
    if (simpleDBClient == null) {
        simpleDBClient = new AmazonSimpleDBClient(awsCredentialsProvider, clientConfig);
        if (System.getProperty("EC2_REGION") != null && !"us-east-1".equals(System.getProperty("EC2_REGION"))) {
            if ("global".equals(System.getProperty("EC2_REGION"))) {
                simpleDBClient.setEndpoint("sdb.amazonaws.com");
            } else {
                simpleDBClient.setEndpoint("sdb." + System.getProperty("EC2_REGION") + ".amazonaws.com");
            }//from  ww w.  j  a v  a2 s.c  o  m
        }
    }
    return simpleDBClient;
}