public class PrioritizedCloudAdapter extends Object implements Comparable<PrioritizedCloudAdapter>
SplitterConfig| Constructor and Description |
|---|
PrioritizedCloudAdapter(int priority,
String cloudAdapterHost,
int cloudAdapterPort,
com.elastisys.scale.commons.net.ssl.BasicCredentials basicCredentials,
com.elastisys.scale.commons.net.ssl.CertificateCredentials certificateCredentials)
Creates a new instance with the values set to the given values.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(PrioritizedCloudAdapter o)
Compares the priorities of the prioritized cloud adapters so that higher
priorities are sorted first, i.e., descending order is the most natural
for these adapters.
|
boolean |
equals(Object obj)
Two
PrioritizedCloudAdapters are considered equal if they share
the same host and port. |
com.google.common.base.Optional<com.elastisys.scale.commons.net.ssl.BasicCredentials> |
getBasicCredentials()
Returns credentials, if any, required for HTTP Basic Authentication.
|
com.google.common.base.Optional<com.elastisys.scale.commons.net.ssl.CertificateCredentials> |
getCertificateCredentials()
Returns credentials, if any, for SSL/TLS certificate-based
authentication.
|
String |
getCloudAdapterHost()
Returns the hostname of the REST endpoint.
|
int |
getCloudAdapterPort()
Returns the port number of the REST endpoint.
|
int |
getPriority()
Returns the priority of this cloud adapter.
|
int |
hashCode()
Two
PrioritizedCloudAdapters are considered equal if they share
the same host and port. |
String |
toString() |
void |
validate()
Makes a basic sanity check verifying that all values are non-
null. |
public PrioritizedCloudAdapter(int priority,
String cloudAdapterHost,
int cloudAdapterPort,
com.elastisys.scale.commons.net.ssl.BasicCredentials basicCredentials,
com.elastisys.scale.commons.net.ssl.CertificateCredentials certificateCredentials)
priority - The priority of this cloud adapter.cloudAdapterHost - The hostname of the REST endpoint.cloudAdapterPort - The port number of the REST endpoint.basicCredentials - Credentials, if any, required for HTTP Basic Authentication.
If none are needed, provide null as the value.certificateCredentials - Credentials, if any, for SSL/TLS certificate-based
authentication. If none are needed, provide null as the value.public int getPriority()
public String getCloudAdapterHost()
public int getCloudAdapterPort()
public com.google.common.base.Optional<com.elastisys.scale.commons.net.ssl.BasicCredentials> getBasicCredentials()
public com.google.common.base.Optional<com.elastisys.scale.commons.net.ssl.CertificateCredentials> getCertificateCredentials()
public void validate()
throws IllegalArgumentException
null. If a value is missing for any field a
ConfigurationException is thrown.IllegalArgumentException - If any configuration field is missing.public int hashCode()
PrioritizedCloudAdapters are considered equal if they share
the same host and port.hashCode in class ObjectObject.hashCode()public boolean equals(Object obj)
PrioritizedCloudAdapters are considered equal if they share
the same host and port.equals in class ObjectObject.equals(java.lang.Object)public int compareTo(PrioritizedCloudAdapter o)
compareTo in interface Comparable<PrioritizedCloudAdapter>Copyright © 2011–2015 elastisys. All rights reserved.