javax.wbem.client

Class WBEMClientFactory

public class WBEMClientFactory extends 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 WBEMClientgetClient(String pProtocol)
Get a WBEMClient for a protocol.
static String[]getSupportedProtocols()
Get the names of the supported protocols.

Constructor Detail

WBEMClientFactory

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

Method Detail

getClient

public static WBEMClient getClient(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: 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 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.