javax.wbem.client
Class WBEMClientFactory

java.lang.Object
  extended byjavax.wbem.client.WBEMClientFactory

public class WBEMClientFactory
extends java.lang.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(java.lang.String protocol)
          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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WBEMClientFactory

public WBEMClientFactory()
Method Detail

getClient

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

Parameters:
protocol - 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
 
java.lang.Exception

getSupportedProtocols

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

Returns:
a string array of the supported protocols
Throws:
java.lang.Exception


Java™ WBEM (JSR48) 1.0.0 API