public class UcmdbServiceFactory extends Object
getServiceProvider
methods.connect
methods.
Example:
final String HOST_NAME = "localhost"; final int PORT = 8080; UcmdbServiceProvider provider = UcmdbServiceFactory.getServiceProvider(HOST_NAME, PORT); final String USERNAME = "integration_user"; final String PASSWORD = "integration_password"; Credentials credentials = provider.createCredentials(USERNAME, PASSWORD), ClientContext clientContext = provider.createClientContext("Example"); UcmdbService ucmdbService = provider.connect(credentials, clientContext);
UcmdbServiceProvider
Modifier and Type | Class and Description |
---|---|
static class |
UcmdbServiceFactory.AllHostAcceptedVerifier
Disables host name verfication (used in case of NAT networks)
|
static interface |
UcmdbServiceFactory.ConnectionProperties
Internal implementation.
|
static class |
UcmdbServiceFactory.DefaultTruststoreManger
The X509TrustManager implementation.
|
static interface |
UcmdbServiceFactory.HttpBootstrap
Internal implementation.
|
static interface |
UcmdbServiceFactory.HttpUcmdbServiceProviderFactory
Internal implementation.
|
Modifier and Type | Field and Description |
---|---|
static String |
CERT_CRL_PATH |
static String |
CERTIFICATE_FULL_VALIDATION |
static String |
KEY_STORE_PASWORD |
static String |
KEY_STORE_PATH |
static String |
PKIX_CERT_TYPE |
static String |
SSL_CHECK_REVOCATION |
static String |
TRUST_STORE_PASWORD |
static String |
TRUST_STORE_PATH |
Modifier and Type | Method and Description |
---|---|
static String |
getClientVersion() |
static PKIXBuilderParameters |
getPkixBuilderParameters(KeyStore ts,
boolean enableCertRevocationChecking) |
static UcmdbServiceProvider |
getServiceProvider(String host,
int port)
Returns an instance of a UCMDB service provider from the specified host and port.
|
static UcmdbServiceProvider |
getServiceProvider(String protocol,
String host,
int port) |
static UcmdbServiceProvider |
getServiceProvider(String protocol,
String host,
int port,
String rootContext)
Returns an instance of a UCMDB service provider from the specified host port using the specified protocol.
|
static UcmdbServiceProvider |
getServiceProvider(String protocol,
String host,
int port,
String rootContext,
Proxy proxy)
Returns an instance of a UCMDB service provider from the specified host port using the specified protocol.
|
static UcmdbServiceProvider |
getServiceProvider(String protocol,
String host,
int port,
String rootContext,
Proxy proxy,
SSLContext sslContext)
Returns an instance of a UCMDB service provider from the specified host port using the specified protocol.
|
static UcmdbServiceProvider |
getServiceProvider(String protocol,
String host,
int port,
String rootContext,
SSLContext sslContext)
Returns an instance of a UCMDB service provider from the specified host port using the specified protocol.
|
static void |
initSSL()
Initializes the secure socket layer.
|
static SSLContext |
initSSL(SSLContext sslContext) |
static Collection<CRL> |
loadCRL(List<String> crlPaths) |
static String |
validateFilePath(String filePath) |
public static final String PKIX_CERT_TYPE
public static final String CERT_CRL_PATH
public static final String KEY_STORE_PATH
public static final String TRUST_STORE_PATH
public static final String KEY_STORE_PASWORD
public static final String TRUST_STORE_PASWORD
public static final String SSL_CHECK_REVOCATION
public static final String CERTIFICATE_FULL_VALIDATION
public static String getClientVersion()
public static UcmdbServiceProvider getServiceProvider(String host, int port) throws MalformedURLException, IncompatibleVersionException
host
- name of the web server host.port
- port the web server listens on. Generally 80 or 8080.MalformedURLException
- if the host name results in an invalid URL.IncompatibleVersionException
- if the version of the client is unsupported by the version
running on the server.public static UcmdbServiceProvider getServiceProvider(String protocol, String host, int port, String rootContext) throws MalformedURLException, IncompatibleVersionException
protocol
- either "http" or "https".host
- name of the web server host.port
- port the web server listens on. Generally 80 or 8080 for http, 443 for https.MalformedURLException
- if the host name results in an invalid URL.IncompatibleVersionException
- if the version of the client is unsupported by the version
running on the server.public static UcmdbServiceProvider getServiceProvider(String protocol, String host, int port, String rootContext, Proxy proxy) throws MalformedURLException
protocol
- either "http" or "https".host
- name of the web server host.port
- port the web server listens on. Generally 80 or 8080 for http, 443 for https.proxy
- the Proxy through which this connection will be made.MalformedURLException
- if the host name results in an invalid URL.IncompatibleVersionException
- if the version of the client is unsupported by the version
running on the server.public static UcmdbServiceProvider getServiceProvider(String protocol, String host, int port, String rootContext, SSLContext sslContext) throws MalformedURLException
protocol
- either "http" or "https".host
- name of the web server host.port
- port the web server listens on. Generally 80 or 8080 for http, 443 for https.sslContext
- the Proxy through which this connection will be made.MalformedURLException
- if the host name results in an invalid URL.IncompatibleVersionException
- if the version of the client is unsupported by the version
running on the server.public static UcmdbServiceProvider getServiceProvider(String protocol, String host, int port, String rootContext, Proxy proxy, SSLContext sslContext) throws MalformedURLException
protocol
- either "http" or "https".host
- name of the web server host.port
- port the web server listens on. Generally 80 or 8080 for http, 443 for https.proxy
- the Proxy through which this connection will be made.sslContext
- the sslCntext through which this connection will be made.MalformedURLException
- if the host name results in an invalid URL.IncompatibleVersionException
- if the version of the client is unsupported by the version
running on the server.public static UcmdbServiceProvider getServiceProvider(String protocol, String host, int port) throws MalformedURLException, IncompatibleVersionException
public static void initSSL()
public static SSLContext initSSL(SSLContext sslContext)
public static PKIXBuilderParameters getPkixBuilderParameters(KeyStore ts, boolean enableCertRevocationChecking) throws Exception
Exception
public static Collection<CRL> loadCRL(List<String> crlPaths) throws IOException, CertificateException, CRLException
public static String validateFilePath(String filePath) throws IOException
IOException