public class WmiUtil extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
WmiUtil.ValueType
Enum for WMI queries for proper parsing from the returned VARIANT
|
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_NAMESPACE |
| Constructor and Description |
|---|
WmiUtil() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
hasNamespace(String namespace)
Determine if WMI has the requested namespace.
|
static Float |
selectFloatFrom(String namespace,
String wmiClass,
String property,
String whereClause)
Get a single Float value from WMI
|
static Map<String,List<Float>> |
selectFloatsFrom(String namespace,
String wmiClass,
String properties,
String whereClause)
Get multiple Float values from WMI
|
static Map<String,List<Object>> |
selectObjectsFrom(String namespace,
String wmiClass,
String properties,
String whereClause,
WmiUtil.ValueType[] propertyTypes)
Get multiple individually typed values from WMI
|
static String |
selectStringFrom(String namespace,
String wmiClass,
String property,
String whereClause)
Get a single String value from WMI
|
static Map<String,List<String>> |
selectStringsFrom(String namespace,
String wmiClass,
String properties,
String whereClause)
Get multiple String values from WMI
|
static Long |
selectUint32From(String namespace,
String wmiClass,
String property,
String whereClause)
Get a single Unsigned Integer value from WMI (as Long)
|
static Map<String,List<Long>> |
selectUint32sFrom(String namespace,
String wmiClass,
String properties,
String whereClause)
Get multiple Unsigned Integer values from WMI (as Longs)
|
public static final String DEFAULT_NAMESPACE
public static boolean hasNamespace(String namespace)
namespace - The namespace to testpublic static Long selectUint32From(String namespace, String wmiClass, String property, String whereClause)
namespace - The namespace or null to use the defaultwmiClass - The class to queryproperty - The property whose value to returnwhereClause - A WQL where clause matching properties and keywordspublic static Map<String,List<Long>> selectUint32sFrom(String namespace, String wmiClass, String properties, String whereClause)
namespace - The namespace or null to use the defaultwmiClass - The class to queryproperties - A comma delimited list of properties whose value to returnwhereClause - A WQL where clause matching properties and keywordspublic static Float selectFloatFrom(String namespace, String wmiClass, String property, String whereClause)
namespace - The namespace or null to use the defaultwmiClass - The class to queryproperty - The property whose value to returnwhereClause - A WQL where clause matching properties and keywordspublic static Map<String,List<Float>> selectFloatsFrom(String namespace, String wmiClass, String properties, String whereClause)
namespace - The namespace or null to use the defaultwmiClass - The class to queryproperties - A comma delimited list of properties whose value to returnwhereClause - A WQL where clause matching properties and keywordspublic static String selectStringFrom(String namespace, String wmiClass, String property, String whereClause)
namespace - The namespace or null to use the defaultwmiClass - The class to queryproperty - The property whose value to returnwhereClause - A WQL where clause matching properties and keywordspublic static Map<String,List<String>> selectStringsFrom(String namespace, String wmiClass, String properties, String whereClause)
namespace - The namespace or null to use the defaultwmiClass - The class to queryproperties - A comma delimited list of properties whose value to returnwhereClause - A WQL where clause matching properties and keywordspublic static Map<String,List<Object>> selectObjectsFrom(String namespace, String wmiClass, String properties, String whereClause, WmiUtil.ValueType[] propertyTypes)
namespace - The namespace or null to use the defaultwmiClass - The class to queryproperties - A comma delimited list of properties whose value to returnwhereClause - A WQL where clause matching properties and keywordspropertyTypes - An array of types corresponding to the properties, or a single
element arrayCopyright © 2010–2017 oshi. All rights reserved.