Hyperic HQ Plugin API v. 5.8.0

org.hyperic.hq.product
Class DetectionUtil

java.lang.Object
  extended by org.hyperic.hq.product.DetectionUtil

public class DetectionUtil
extends Object


Constructor Summary
DetectionUtil()
           
 
Method Summary
static Set<Long> getAllChildPid(long parentPid)
          This method finds all the childs of the provided process
static String getMacs(String name)
           
protected static org.hyperic.sigar.SigarProxy getSigar()
           
static Set<String> getWMIObj(String namespace, String wmiObjName, Map<String,String> filters, String col, String name)
           
static void main(String[] args)
           
static void populateListeningPorts(long pid, org.hyperic.util.config.ConfigResponse cf, boolean recursive)
          This method finds all the ports the provided pid listens on and adds them as a list to the provided ConfigResponse instance
static void populateListeningPorts(Set<Long> pids, org.hyperic.util.config.ConfigResponse cf)
          This method finds all the ports the provided pids are listening on and adds them as a list to the provided ConfigResponse instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DetectionUtil

public DetectionUtil()
Method Detail

populateListeningPorts

public static void populateListeningPorts(long pid,
                                          org.hyperic.util.config.ConfigResponse cf,
                                          boolean recursive)
This method finds all the ports the provided pid listens on and adds them as a list to the provided ConfigResponse instance

Parameters:
pid - - the process id for which we want to get the listening ports
cf - - usually the product config
recursive - - if true the population of the listening port will use all the child processes of the pid

populateListeningPorts

public static void populateListeningPorts(Set<Long> pids,
                                          org.hyperic.util.config.ConfigResponse cf)
This method finds all the ports the provided pids are listening on and adds them as a list to the provided ConfigResponse instance

Parameters:
pids - - the ids of the processes we want to get the listening ports for
cf - - usually the product config

getAllChildPid

public static Set<Long> getAllChildPid(long parentPid)
This method finds all the childs of the provided process

Parameters:
parentPid -

getSigar

protected static org.hyperic.sigar.SigarProxy getSigar()

getMacs

public static String getMacs(String name)
                      throws IOException
Throws:
IOException

main

public static void main(String[] args)
                 throws Throwable
Throws:
Throwable

getWMIObj

public static Set<String> getWMIObj(String namespace,
                                    String wmiObjName,
                                    Map<String,String> filters,
                                    String col,
                                    String name)
                             throws PluginException
Parameters:
wmiObjName -
filter - a name-value pair. The first '-' sign seperates between the name and the value. The rest which follows are part of the value's name
col -
name -
Returns:
Throws:
PluginException

Hyperic HQ Plugin API v. 5.8.0

Copyright © 2004-2010 Hyperic, Inc. support@hyperic.net, All Rights Reserved.