javax.wbem.client
Class WBEMClientFactory

java.lang.Object
  extended by javax.wbem.client.WBEMClientFactory

public class WBEMClientFactory
extends java.lang.Object

The WBEMClientFactory class is a factory that will supply a WBEMClient implementation for a specific protocol. An example of how to use the factory is included below.

   ...
   CIMClient cc = null;
   try {
         cc = WBEMClientFactory.getClient(WBEMClientConstants.PROTOCOL_CIMXML);
   } catch (Exception e) {
     System.out.println("Received error when trying to retrieve client handle");
     System.exit(-1);
   }
   cc.initialize(cns, s, null);
 


Constructor Summary
WBEMClientFactory()
          Not used currently.
 
Method Summary
static WBEMClient getClient(java.lang.String pProtocol)
          Get a WBEMClient for a protocol.
static java.lang.String[] getSupportedProtocols()
          Get the names of the supported protocols.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WBEMClientFactory

public WBEMClientFactory()
Not used currently. This class doesn't have to be instantiated.

Method Detail

getClient

public static WBEMClient getClient(java.lang.String pProtocol)
Get a WBEMClient for a protocol.

Parameters:
pProtocol - The protocol name (e.g. "CIM-XML")
Returns:
the WBEMClient implementation for the protocol specified.
Throws:
java.lang.IllegalArgumentException - -
If the protocol is null or empty
If the protocol is not supported
If the protocol implementation could not be loaded

getSupportedProtocols

public static java.lang.String[] getSupportedProtocols()
Get the names of the supported protocols.

Returns:
a string array of the supported protocols


Copyright © 2005, 2009 IBM Corporation. All Rights Reserved.