com.hp.ucmdb.api
Class UcmdbServiceFactory

java.lang.Object
  extended by com.hp.ucmdb.api.UcmdbServiceFactory

public class UcmdbServiceFactory
extends java.lang.Object

Entry point for UCMDB API services.
To obtain a reference to the UCMDB:
1) Get a reference to UcmdbServiceProvider by calling one of the getServiceProvider methods.
2) Call one of the UcmdbServiceProvider 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);
 

See Also:
UcmdbServiceProvider

Nested Class Summary
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.
 
Method Summary
static UcmdbServiceProvider getServiceProvider(java.lang.String host, int port)
          Returns an instance of a UCMDB service provider from the specified host and port.
static UcmdbServiceProvider getServiceProvider(java.lang.String protocol, java.lang.String host, int port)
          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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getServiceProvider

public static UcmdbServiceProvider getServiceProvider(java.lang.String host,
                                                      int port)
                                               throws java.net.MalformedURLException,
                                                      IncompatibleVersionException
Returns an instance of a UCMDB service provider from the specified host and port. The connection is made using HTTP.

Parameters:
host - name of the web server host.
port - port the web server listens on. Generally 80 or 8080.
Returns:
an instance of the service provider.
Throws:
java.net.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.

getServiceProvider

public static UcmdbServiceProvider getServiceProvider(java.lang.String protocol,
                                                      java.lang.String host,
                                                      int port)
                                               throws java.net.MalformedURLException,
                                                      IncompatibleVersionException
Returns an instance of a UCMDB service provider from the specified host port using the specified protocol.

Parameters:
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.
Returns:
an instance of the service provider.
Throws:
java.net.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.

initSSL

public static void initSSL()
Initializes the secure socket layer.



Documentation Feedback
Copyright 2010 Hewlett-Packard Development Company, L.P.