public abstract class AbstractSimpleDbClient extends Object
Possible endpoints for SimpleDB can be retrieved from here:
http://docs.amazonwebservices.com/general/latest/gr/rande.html#sdb_region
Region | Endpoint | Location Constraint | Protocol |
US Standard * | sdb.amazonaws.com | (none required) | HTTP and HTTPS |
US West (Oregon) | sdb-us-west-2.amazonaws.com | us-west-2 | HTTP and HTTPS |
US West (Northern California) | sdb-us-west-1.amazonaws.com | us-west-1 | HTTP and HTTPS |
EU (Ireland) | sdb-eu-west-1.amazonaws.com | EU | HTTP and HTTPS |
Asia Pacific (Singapore) | sdb-ap-southeast-1.amazonaws.com | ap-southeast-1 | HTTP and HTTPS |
Asia Pacific (Tokyo) | sdb-ap-northeast-1.amazonaws.com | ap-northeast-1 | HTTP and HTTPS |
South America (Sao Paulo) | sdb-sa-east-1.amazonaws.com | sa-east-1 | HTTP and HTTPS |
Constructor and Description |
---|
AbstractSimpleDbClient(String aDomainName,
String aAccessKey,
String aSecretKey)
Constructs the SimpleDB support by directly providing all needed
information to setup the instance.
|
AbstractSimpleDbClient(String aDomainName,
String aAccessKey,
String aSecretKey,
String aEndPoint)
Constructs the SimpleDB support by directly providing all needed
information to setup the instance.
|
Modifier and Type | Method and Description |
---|---|
protected static void |
clearDomain(com.amazonaws.services.simpledb.AmazonSimpleDBClient aAmazonSimpleDbClient,
String aDomainName)
Clears all content from the given Amazon SimpleDB domain.
|
protected com.amazonaws.services.simpledb.AmazonSimpleDBClient |
getAmazonSimpleDbClient()
Retrieves the amazon SimpleDB client to be used.
|
protected static com.amazonaws.services.simpledb.AmazonSimpleDBClient |
getAmazonSimpleDbClient(File aConfigFile)
Retrieves an
AmazonSimpleDBClient from a configuration file
containing the access- and the secret key. |
protected String |
getAmazonSimpleDbDomainName()
Retrieves the domain name to be used.
|
protected static List<String> |
getDomainNames(com.amazonaws.services.simpledb.AmazonSimpleDBClient aAmazonSimpleDbClient)
Retrieves a list of domain names retrievable from the given
AmazonSimpleDBClient . |
protected static boolean |
hasDomain(com.amazonaws.services.simpledb.AmazonSimpleDBClient aAmazonSimpleDbClient,
String aDomainName)
Tests whether the given domain exists in Amazon SimpleDB.
|
protected static boolean |
isRequestTimeoutException(Exception aException) |
protected static boolean |
isServiceUnavailableException(Exception aException) |
protected void |
setAmazonSimpleDbDomainName(String aAmazonSimpleDbDomainName)
Sets the domain name to be used.
|
protected static String |
toMessage(Throwable aThrowable)
Creates an Amazon AWS specific exception message from the given throwable
containing additional information such as the AWS error code, the AWS
error type, the request ID, the service name and the status code.
|
public AbstractSimpleDbClient(String aDomainName, String aAccessKey, String aSecretKey)
aDomainName
- The name of the SimpleDB domain to use.aAccessKey
- The Amazon access key to use.aSecretKey
- The Amazon secret key to use.public AbstractSimpleDbClient(String aDomainName, String aAccessKey, String aSecretKey, String aEndPoint)
http://docs.amazonwebservices.com/general/latest/gr/rande.html#sdb_region
aDomainName
- The name of the SimpleDB domain to use.aAccessKey
- The Amazon access key to use.aSecretKey
- The Amazon secret key to use.aEndPoint
- The end-point (Amazon region) to use.protected String getAmazonSimpleDbDomainName()
protected void setAmazonSimpleDbDomainName(String aAmazonSimpleDbDomainName)
The
- domain name to be used.protected com.amazonaws.services.simpledb.AmazonSimpleDBClient getAmazonSimpleDbClient()
protected static boolean isRequestTimeoutException(Exception aException)
protected static boolean isServiceUnavailableException(Exception aException)
protected static String toMessage(Throwable aThrowable)
aThrowable
- The throwable from which to generate the Amazon AWS
specific exception message.protected static void clearDomain(com.amazonaws.services.simpledb.AmazonSimpleDBClient aAmazonSimpleDbClient, String aDomainName)
aAmazonSimpleDbClient
- The AmazonSimpleDBClient
.aDomainName
- The domain name of the domain to be cleared.protected static com.amazonaws.services.simpledb.AmazonSimpleDBClient getAmazonSimpleDbClient(File aConfigFile) throws IOException
AmazonSimpleDBClient
from a configuration file
containing the access- and the secret key.aConfigFile
- The configuration file used to configure the
AmazonSimpleDBClient
.AmazonSimpleDBClient
.IOException
- In case there were problems reading the configuration
file.protected static List<String> getDomainNames(com.amazonaws.services.simpledb.AmazonSimpleDBClient aAmazonSimpleDbClient)
AmazonSimpleDBClient
.aAmazonSimpleDbClient
- The AmazonSimpleDBClient
.String
instances representing the
retrievable domain names.protected static boolean hasDomain(com.amazonaws.services.simpledb.AmazonSimpleDBClient aAmazonSimpleDbClient, String aDomainName)
aAmazonSimpleDbClient
- The AmazonSimpleDBClient
.aDomainName
- The domain name to be tested.Copyright © 2015. All rights reserved.