org.opennms.protocols.wmi
Class WmiClient

java.lang.Object
  extended by org.opennms.protocols.wmi.WmiClient
All Implemented Interfaces:
IWmiClient

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.

Author:
Matt Raykowski , OpenNMS

Constructor Summary
WmiClient(String address)
           
 
Method Summary
 void connect(String domain, String username, String password)
           
static Object convertToNativeType(org.jinterop.dcom.core.JIVariant type)
           
static Date convertWmiDate(String dateStr)
           
 void disconnect()
           
 OnmsWbemObjectSet performExecQuery(String strQuery)
           
 OnmsWbemObjectSet performExecQuery(String strQuery, String strQueryLanguage, Integer flags)
           
 OnmsWbemObjectSet performInstanceOf(String wmiClass)
           
 OnmsWbemObjectSet performSubclassOf()
           
 OnmsWbemObjectSet performSubclassOf(String strSuperClass)
           
 OnmsWbemObject performWmiGet(String strObjectPath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WmiClient

public WmiClient(String address)
          throws WmiException
Throws:
WmiException
Method Detail

performInstanceOf

public OnmsWbemObjectSet performInstanceOf(String wmiClass)
                                    throws WmiException
Specified by:
performInstanceOf in interface IWmiClient
Throws:
WmiException

performExecQuery

public OnmsWbemObjectSet performExecQuery(String strQuery)
                                   throws WmiException
Specified by:
performExecQuery in interface IWmiClient
Throws:
WmiException

performExecQuery

public OnmsWbemObjectSet performExecQuery(String strQuery,
                                          String strQueryLanguage,
                                          Integer flags)
                                   throws WmiException
Specified by:
performExecQuery in interface IWmiClient
Throws:
WmiException

performWmiGet

public OnmsWbemObject performWmiGet(String strObjectPath)
                             throws WmiException
Throws:
WmiException

performSubclassOf

public OnmsWbemObjectSet performSubclassOf(String strSuperClass)
                                    throws WmiException
Throws:
WmiException

performSubclassOf

public OnmsWbemObjectSet performSubclassOf()
                                    throws WmiException
Throws:
WmiException

convertToNativeType

public static Object convertToNativeType(org.jinterop.dcom.core.JIVariant type)
                                  throws WmiException
Throws:
WmiException

connect

public void connect(String domain,
                    String username,
                    String password)
             throws WmiException
Specified by:
connect in interface IWmiClient
Throws:
WmiException

disconnect

public void disconnect()
                throws WmiException
Specified by:
disconnect in interface IWmiClient
Throws:
WmiException

convertWmiDate

public static Date convertWmiDate(String dateStr)
                           throws ParseException
Throws:
ParseException


Copyright © 2009. All Rights Reserved.