Example usage for com.amazonaws.services.rds AmazonRDS setEndpoint

List of usage examples for com.amazonaws.services.rds AmazonRDS setEndpoint

Introduction

In this page you can find the example usage for com.amazonaws.services.rds AmazonRDS setEndpoint.

Prototype

@Deprecated
void setEndpoint(String endpoint);

Source Link

Document

Overrides the default endpoint for this client ("rds.amazonaws.com").

Usage

From source file:com.aipo.aws.rds.RDS.java

License:Open Source License

public static AmazonRDS getClient() {
    AWSContext awsContext = AWSContext.get();
    if (awsContext == null) {
        throw new IllegalStateException("AWSContext is not initialized.");
    }//from w w  w. j  a v  a  2 s . c  o  m
    AmazonRDS client = new AmazonRDSClient(awsContext.getAwsCredentials());
    String endpoint = awsContext.getRdsEndpoint();
    if (endpoint != null && endpoint != "") {
        client.setEndpoint(endpoint);
    }
    return client;
}