public class WmiClient extends Object implements IWmiClient
This is a low-level WMI client harnessing DCOM to communicate with remote agents. The interface provided is similar but not identical to that of the SWbemServices interface.
Constructor and Description |
---|
WmiClient(String address)
Constructor for WmiClient.
|
Modifier and Type | Method and Description |
---|---|
void |
connect(String domain,
String username,
String password,
String namespace)
connect
|
static Object |
convertToNativeType(org.jinterop.dcom.core.JIVariant type)
convertToNativeType
|
static Date |
convertWmiDate(String dateStr)
convertWmiDate
|
void |
disconnect()
disconnect
|
OnmsWbemObjectSet |
performExecQuery(String strQuery)
performExecQuery
|
OnmsWbemObjectSet |
performExecQuery(String strQuery,
String strQueryLanguage,
Integer flags)
performExecQuery
|
OnmsWbemObjectSet |
performInstanceOf(String wmiClass)
performInstanceOf
|
OnmsWbemObjectSet |
performSubclassOf()
performSubclassOf
|
OnmsWbemObjectSet |
performSubclassOf(String strSuperClass)
performSubclassOf
|
OnmsWbemObject |
performWmiGet(String strObjectPath)
performWmiGet
|
public WmiClient(String address) throws WmiException
Constructor for WmiClient.
address
- a String
object.WmiException
- if any.public OnmsWbemObjectSet performInstanceOf(String wmiClass) throws WmiException
performInstanceOf
performInstanceOf
in interface IWmiClient
wmiClass
- a String
object.OnmsWbemObjectSet
object.WmiException
- if any.public OnmsWbemObjectSet performExecQuery(String strQuery) throws WmiException
performExecQuery
performExecQuery
in interface IWmiClient
strQuery
- a String
object.OnmsWbemObjectSet
object.WmiException
- if any.public OnmsWbemObjectSet performExecQuery(String strQuery, String strQueryLanguage, Integer flags) throws WmiException
performExecQuery
performExecQuery
in interface IWmiClient
strQuery
- a String
object.strQueryLanguage
- a String
object.flags
- a Integer
object.OnmsWbemObjectSet
object.WmiException
- if any.public OnmsWbemObject performWmiGet(String strObjectPath) throws WmiException
performWmiGet
strObjectPath
- a String
object.OnmsWbemObject
object.WmiException
- if any.public OnmsWbemObjectSet performSubclassOf(String strSuperClass) throws WmiException
performSubclassOf
strSuperClass
- a String
object.OnmsWbemObjectSet
object.WmiException
- if any.public OnmsWbemObjectSet performSubclassOf() throws WmiException
performSubclassOf
OnmsWbemObjectSet
object.WmiException
- if any.public static Object convertToNativeType(org.jinterop.dcom.core.JIVariant type) throws WmiException
convertToNativeType
type
- a JIVariant
object.Object
object.WmiException
- if any.public void connect(String domain, String username, String password, String namespace) throws WmiException
connect
connect
in interface IWmiClient
domain
- a String
object.username
- a String
object.password
- a String
object.namespace
- a String
object.WmiException
- if any.public void disconnect() throws WmiException
disconnect
disconnect
in interface IWmiClient
WmiException
- if any.public static Date convertWmiDate(String dateStr) throws ParseException
convertWmiDate
dateStr
- a String
object.Date
object.ParseException
- if any.Copyright © 2021. All rights reserved.