public class WBEMClientFactory extends Object
WBEMClient
factory,
which is used to retrieve a WBEMClient
for a specified protocol.
An example of how to use the factory is included below.
... WBEMClient 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); } // initialize the client cc.initialize(cns, s, null); ...
Constructor and Description |
---|
WBEMClientFactory() |
Modifier and Type | Method and Description |
---|---|
static WBEMClient |
getClient(String pProtocol)
Get a
WBEMClient for a protocol. |
static String[] |
getSupportedProtocols()
Get the names of the supported protocols.
|
public static WBEMClient getClient(String pProtocol) throws WBEMException
WBEMClient
for a protocol.pProtocol
- The protocol name (e.g. "CIM-XML").WBEMClient
implementation for the protocol
specified.IllegalArgumentException
- null
or empty.WBEMException
- If the protocol implementation could not be loaded.public static String[] getSupportedProtocols()
Copyright © 2005, 2012 IBM Corporation. All Rights Reserved.