public static class WbemcliUtil.WmiQuery<T extends java.lang.Enum<T>>
extends java.lang.Object
Constructor and Description |
---|
WmiQuery(java.lang.String wmiClassName,
java.lang.Class<T> propertyEnum)
Instantiate a WMI Query in the default namespace
|
WmiQuery(java.lang.String nameSpace,
java.lang.String wmiClassName,
java.lang.Class<T> propertyEnum)
Instantiate a WmiQuery.
|
Modifier and Type | Method and Description |
---|---|
WbemcliUtil.WmiResult<T> |
execute()
Query WMI for values, with no timeout.
|
WbemcliUtil.WmiResult<T> |
execute(int timeout)
Query WMI for values, with a specified timeout.
|
java.lang.String |
getNameSpace() |
java.lang.Class<T> |
getPropertyEnum() |
java.lang.String |
getWmiClassName() |
void |
setNameSpace(java.lang.String nameSpace) |
void |
setWmiClassName(java.lang.String wmiClassName) |
public WmiQuery(java.lang.String nameSpace, java.lang.String wmiClassName, java.lang.Class<T> propertyEnum)
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.public WmiQuery(java.lang.String wmiClassName, java.lang.Class<T> propertyEnum)
wmiClassName
- The WMI Class to use. May include a WHERE clause
with filtering conditions.propertyEnum
- An Enum that contains the properties to querypublic java.lang.Class<T> getPropertyEnum()
public java.lang.String getNameSpace()
public void setNameSpace(java.lang.String nameSpace)
nameSpace
- The namespace to setpublic java.lang.String getWmiClassName()
public void setWmiClassName(java.lang.String wmiClassName)
wmiClassName
- The classname to setpublic WbemcliUtil.WmiResult<T> execute()
public WbemcliUtil.WmiResult<T> execute(int timeout) throws java.util.concurrent.TimeoutException
timeout
- Number of milliseconds to wait for results before timing
out. If Wbemcli.WBEM_INFINITE
(-1),
will always wait for results. If a timeout occurs, throws
a TimeoutException
.java.util.concurrent.TimeoutException
- if the query times out before completion