T
- extends ServiceBasepublic abstract class AbstractFactory<T extends ServiceBase>
extends java.lang.Object
Constructor and Description |
---|
AbstractFactory() |
Modifier and Type | Method and Description |
---|---|
protected RequestDispatcher |
buildRequestDispatcher(java.lang.String target,
Optional<java.lang.Integer> port,
java.lang.String username,
java.lang.String password,
Optional<java.lang.String> apiVersion,
boolean verifySSL) |
protected T |
checkVersion(java.lang.String target,
Optional<java.lang.Integer> port,
java.lang.String username,
java.lang.String password,
Optional<java.lang.String> version,
boolean verifySSL)
Checks the version of an endpoint against the target endpoint.
|
protected abstract double |
getMinApiVersion()
Getter for property 'minApiVersion'.
|
protected static void |
testTargetFormat(java.lang.String target,
boolean verifySSL)
Checks if the provided target is in the form of an IP address or a hostname.
|
protected static java.net.URL |
toEndpoint(java.lang.String target,
Optional<java.lang.Integer> port,
double apiVersion)
Creates a URL representation of a SolidFire API endpoint, depending on the optional value of port, in the form:
https://{target}:{port}/json-rpc/{apiVersion}
or
https://{target}/json-rpc/{apiVersion}
|
protected abstract T |
toServiceBase(RequestDispatcher requestDispatcher)
Initializes the ServiceBase with a given RequestDispatcher.
|
protected abstract double getMinApiVersion()
protected abstract T toServiceBase(RequestDispatcher requestDispatcher)
requestDispatcher
- the instantiated RequestBuilderprotected RequestDispatcher buildRequestDispatcher(java.lang.String target, Optional<java.lang.Integer> port, java.lang.String username, java.lang.String password, Optional<java.lang.String> apiVersion, boolean verifySSL)
target
- the management virtual IP (or hostname)port
- the port to useusername
- admin usernamepassword
- admin passwordapiVersion
- the version of the API servicesverifySSL
- if set to true, the target will be checked against the list of valid SSL hosts, including verification of the
validity of the Cert recorded for a given target, otherwise these validity checks are ignored, which is useful
when the target is an IP address.protected static void testTargetFormat(java.lang.String target, boolean verifySSL)
target
- the management virtual IP (or hostname)verifySSL
- if set to true, the target will be checked against the list of valid SSL hosts, including verification of the
validity of the Cert recorded for a given target, otherwise these validity checks are ignored, which is useful
when the target is an IP address.ApiException
- when target is in the form of an IP address and verifySSL is true.protected static java.net.URL toEndpoint(java.lang.String target, Optional<java.lang.Integer> port, double apiVersion)
target
- the management virtual IP (or hostname)port
- (optional) the port to useapiVersion
- the version of the API servicesprotected T checkVersion(java.lang.String target, Optional<java.lang.Integer> port, java.lang.String username, java.lang.String password, Optional<java.lang.String> version, boolean verifySSL)
target
- the management virtual IP (or hostname)port
- (optional) the port to useusername
- admin usernamepassword
- admin passwordversion
- (optional) the requested supported version of the SolidFire ClusterverifySSL
- if set to true, the target will be checked against the list of valid SSL hosts, including verification of the
validity of the Cert recorded for a given target, otherwise these validity checks are ignored, which is useful
when the target is an IP address.