Class WbemcliUtil.WmiQuery<T extends Enum<T>>
java.lang.Object
com.sun.jna.platform.win32.COM.WbemcliUtil.WmiQuery<T>
- Enclosing class:
WbemcliUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionexecute()Query WMI for values, with no timeout.execute(int timeout) Query WMI for values, with a specified timeout.voidsetNameSpace(String nameSpace) voidsetWmiClassName(String wmiClassName)
-
Constructor Details
-
WmiQuery
Instantiate a WmiQuery.- Parameters:
nameSpace- The WMI namespace to use.wmiClassName- The WMI class to use. Optionally include a WQL WHERE clause with filters results to properties matching the input.propertyEnum- An enum for type mapping.
-
WmiQuery
-
-
Method Details
-
getPropertyEnum
-
getNameSpace
- Returns:
- The namespace
-
setNameSpace
- Parameters:
nameSpace- The namespace to set
-
getWmiClassName
- Returns:
- The class name
-
setWmiClassName
- Parameters:
wmiClassName- The classname to set
-
execute
Query WMI for values, with no timeout.- Returns:
- a WmiResult object containing the query results, wrapping an EnumMap
-
execute
Query WMI for values, with a specified timeout.- Parameters:
timeout- Number of milliseconds to wait for results before timing out. If(-1), will always wait for results. If a timeout occurs, throws ainvalid reference
IEnumWbemClassObject#WBEM_INFINITETimeoutException.- Returns:
- a WmiResult object containing the query results, wrapping an EnumMap
- Throws:
TimeoutException- if the query times out before completion
-