javax.wbem.client
Class WBEMClientFactory

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

public class WBEMClientFactory
extends Object

This class defines the functionality of a WBEMClient factory, which is used to retrieve a WBEMClient for a specified protocol. An example of how to use the factory is included below.

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


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

Constructor Detail

WBEMClientFactory

public WBEMClientFactory()
Method Detail

getClient

public static WBEMClient getClient(String protocol)
                            throws WBEMException
Get a WBEMClient for a protocol.

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

getSupportedProtocols

public static String[] getSupportedProtocols()
                                      throws Exception
Get the names of the supported protocols.

Returns:
a string array of the supported protocols
Throws:
Exception


Copyright © 2002-2007 WBEM Solutions, Inc. All Rights Reserved.