Package com.sun.jna.platform.win32.COM
Class WbemcliUtil
java.lang.Object
com.sun.jna.platform.win32.COM.WbemcliUtil
Utility class providing access to Windows Management Interface (WMI) via COM.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classWbemcliUtil.WmiQuery<T extends Enum<T>>Helper class wrapping information required for a WMI query.classWbemcliUtil.WmiResult<T extends Enum<T>>Helper class wrapping an EnumMap containing the results of a query.
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe default namespace for most WMI queries.static final WbemcliUtilInstance to generate the WmiQuery class.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic Wbemcli.IWbemServicesconnectServer(String namespace) Obtains a locator to the WMI server and connects to the specified namespacestatic booleanhasNamespace(String namespace) Determine if WMI has the requested namespace.
- 
Field Details- 
INSTANCEInstance to generate the WmiQuery class.
- 
DEFAULT_NAMESPACEThe default namespace for most WMI queries.- See Also:
 
 
- 
- 
Constructor Details- 
WbemcliUtilpublic WbemcliUtil()
 
- 
- 
Method Details- 
hasNamespaceDetermine if WMI has the requested namespace. Some namespaces only exist on newer versions of Windows.- Parameters:
- namespace- The namespace to test
- Returns:
- true if the namespace exists, false otherwise
 
- 
connectServerObtains a locator to the WMI server and connects to the specified namespace- Parameters:
- namespace- The namespace to connect to
- Returns:
- A service representing the connected namespace, which can be queried. This service may be re-used for multiple queries and should be released by the user
 
 
-