Package javax.wbem.client
Class WBEMClientFactory
- java.lang.Object
-
- javax.wbem.client.WBEMClientFactory
-
public class WBEMClientFactory extends java.lang.ObjectThis class defines the functionality of aWBEMClientfactory, which is used to retrieve aWBEMClientfor 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 Summary
Constructors Constructor Description WBEMClientFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static WBEMClientgetClient(java.lang.String pProtocol)Get aWBEMClientfor a protocol.static java.lang.String[]getSupportedProtocols()Get the names of the supported protocols.
-
-
-
Method Detail
-
getClient
public static WBEMClient getClient(java.lang.String pProtocol) throws WBEMException
Get aWBEMClientfor a protocol.- Parameters:
pProtocol- The protocol name (e.g. "CIM-XML").- Returns:
- The
WBEMClientimplementation for the protocol specified. - Throws:
java.lang.IllegalArgumentException-- If the protocol is
nullor empty. - If the protocol is not supported.
- If the protocol is
WBEMException- 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.
-
-