List of usage examples for com.amazonaws.services.redshift.model Endpoint getAddress
public String getAddress()
The DNS address of the Cluster.
From source file:com.amazon.services.awsrum.utils.RedshiftUtils.java
License:Open Source License
/** * Helper method to convert a Redshift {@link Endpoint} and database name to JDBC connection * String/*from w ww . j av a2 s. c o m*/ * * @param endpoint * The Redshit Endpoint to convert to connection String * @param databaseName * The database name for the Redshift cluster * @return The JDBC connection String associated with the Endpoint and database name */ private static String toJDBC(Endpoint endpoint, String databaseName) { StringBuilder jdbc = new StringBuilder(); jdbc.append("jdbc:postgresql://"); jdbc.append(endpoint.getAddress()); jdbc.append(":" + endpoint.getPort()); jdbc.append("/" + databaseName); return jdbc.toString(); }