com.datastax.driver.core.CloudConfig Maven / Gradle / Ivy
/*
* Copyright DataStax, Inc.
*
* This software can be used solely with DataStax Enterprise. Please consult the license at
* http://www.datastax.com/terms/datastax-dse-driver-license-terms
*/
package com.datastax.driver.core;
import com.google.common.collect.ImmutableList;
import java.net.InetSocketAddress;
import java.util.List;
class CloudConfig {
private final InetSocketAddress proxyAddress;
private final List endPoints;
private final String localDatacenter;
private final SSLOptions sslOptions;
private final AuthProvider authProvider;
CloudConfig(
InetSocketAddress proxyAddress,
List endPoints,
String localDatacenter,
SSLOptions sslOptions,
AuthProvider authProvider) {
this.proxyAddress = proxyAddress;
this.endPoints = ImmutableList.copyOf(endPoints);
this.localDatacenter = localDatacenter;
this.sslOptions = sslOptions;
this.authProvider = authProvider;
}
/** @return not null proxy Address */
InetSocketAddress getProxyAddress() {
return proxyAddress;
}
/** @return not null endpoints */
List getEndPoints() {
return endPoints;
}
/** @return not null local data center */
String getLocalDatacenter() {
return localDatacenter;
}
/** @return not null ssl options that can be used to connect to SniProxy */
SSLOptions getSslOptions() {
return sslOptions;
}
/**
* @return nullable AuthProvider that can be used to connect to proxy or null if there was not
* username/password provided in the secure bundle
*/
AuthProvider getAuthProvider() {
return authProvider;
}
}