Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.5.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.hq.product
Class DaemonDetector

    java.lang.Object
      org.hyperic.hq.product.GenericPlugin
          org.hyperic.hq.product.ServerDetector
              org.hyperic.hq.product.DaemonDetector

All Implemented Interfaces:
  AutoServerDetector, FileServerDetector, RuntimeDiscoverer

Direct Known Subclasses:
  MxServerDetector, SNMPDetector

    public class DaemonDetector

extends ServerDetector
implements AutoServerDetector, FileServerDetector

Generic detector for use by pure-xml plugins.

Field Summary

Fields inherited from class org.hyperic.hq.product.ServerDetector
`AUTOINVENTORY_NAME, INSTALLPATH, INVENTORY_ID`

Fields inherited from class org.hyperic.hq.product.GenericPlugin
`config, FILE_DELIM, FILE_DELIM_ESC, PROP_NAME`

Constructor Summary
`DaemonDetector()`

Method Summary
`protected void` | `discoverServerConfig(ServerResource server, long pid)` Auto-discover server configuration
`protected List` | `discoverServices(org.hyperic.util.config.ConfigResponse config)` Override to discover services for the server type of the plugin instance.
`protected List` | `getFileResources(org.hyperic.util.config.ConfigResponse platformConfig)` Check for installed files using the file-scan config without running a full file-scan.
`protected org.hyperic.util.config.ConfigResponse` | `getPlatformConfig()`
`protected String` | `getProcessQuery()`
`protected List` | `getProcessResources(org.hyperic.util.config.ConfigResponse platformConfig)` Process table scan
`protected Map` | `getProcOpts(long pid)` Convert getopt-style process arguments into a Map.
`List` | `getServerResources(org.hyperic.util.config.ConfigResponse platformConfig)`
`List` | `getServerResources(org.hyperic.util.config.ConfigResponse platformConfig, String path)` This interface is used by the Auto-Discovery file system scan.
`protected boolean` | `isSwitch(String arg)`
`protected ServerResource` | `newServerResource(long pid, String exe)`
`protected ServerResource` | `newServerResource(String exe)`
`protected void` | `setPlatformConfig(org.hyperic.util.config.ConfigResponse config)`

Methods inherited from class org.hyperic.hq.product.ServerDetector
`createServerResource, createServiceResource, discoverResources, discoverServers, discoverServiceTypes, findVersionFile, formatAutoInventoryName, formatName, getCanonicalPath, getConfigSchema, getConnectionProtocol, getDocument, getListenAddress, getListenAddress, getManager, getParentDir, getParentDir, getPids, getProcArgs, getProcCwd, getProcExe, getProcExe, getProcModules, getRegistryScanKeys, getRuntimeDiscoverer, getScanOrder, getServerSignature, getServiceConfigs, getServiceInventoryPlugins, getSigar, getTypeProperty, getXPathValue, getXPathValue, init, isInstallTypeVersion, isRuntimeDiscoverySupported, isSSLPort, isWin32ServiceRunning, setControlConfig, setControlConfig, setCustomProperties, setCustomProperties, setDescription, setMeasurementConfig, setMeasurementConfig, setProductConfig, setProductConfig`

Methods inherited from class org.hyperic.hq.product.GenericPlugin
`adjustClassPath, configure, getAbsoluteFiles, getConfig, getConfig, getConfigSchema, getCustomPropertiesSchema, getCustomPropertiesSchema, getCustomPropertiesSchema, getDefaultInstallPath, getLog, getLogName, getManagerProperty, getName, getPlatformName, getPluginClassName, getPluginData, getPluginProperty, getProductPlugin, getProperties, getScriptExtension, getScriptExtension, getScriptExtension, getTypeInfo, getTypeNameProperty, getTypeNameProperty, getTypeProperties, getTypeProperty, getTypeProperty, isNetStatEnabled, isWin32, openResource, setData, setName, setTypeInfo, shutdown, toFileList`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DaemonDetector

    public DaemonDetector()

Method Detail

### getProcessQuery

    protected String getProcessQuery()

### isSwitch

    protected boolean isSwitch(String arg)

### getProcOpts

    protected Map getProcOpts(long pid)

  Convert getopt-style process arguments into a Map.

  Parameters:
    `pid` - Process id
  Returns:
    Map of -switch => value arguments

### discoverServerConfig

    protected void discoverServerConfig(ServerResource server,
                                        long pid)

  Auto-discover server configuration

  Parameters:
    `server` - Auto-discovered server
    `pid` - Process id

### newServerResource

    protected ServerResource newServerResource(long pid,
                                               String exe)

### newServerResource

    protected ServerResource newServerResource(String exe)

### setPlatformConfig

    protected void setPlatformConfig(org.hyperic.util.config.ConfigResponse config)

### getPlatformConfig

    protected org.hyperic.util.config.ConfigResponse getPlatformConfig()

### getServerResources

    public List getServerResources(org.hyperic.util.config.ConfigResponse platformConfig)
                            throws PluginException

  Specified by:
    `getServerResources` in interface `AutoServerDetector`
  Throws:
    `PluginException`

### getServerResources

    public List getServerResources(org.hyperic.util.config.ConfigResponse platformConfig,
                                   String path)
                            throws PluginException

  Description copied from interface: `FileServerDetector`
  This interface is used by the Auto-Discovery file system scan. Plugins specify file patterns to match in etc/hq-server-sigs.properties When a file or directory matches one of these patterns, this method will be invoked. It is up to the plugin to use the matched file or directory as a hint to find server installations.

  Specified by:
    `getServerResources` in interface `FileServerDetector`
  Parameters:
    `platformConfig` - Platform config properties.
    `path` - The absolute path to the matched file or directory.
  Returns:
    A List of ServerResource objects representing the servers that were discovered. It is possible for multiple servers to be in a single directory. For example, the Covalent ERS has one directory with Apache server binaries and one or more directories of configuration for each server instance. This method should return null if no servers were found.
  Throws:
    `PluginException` - If an error occured during server detection.
  See Also:
    `ServerResource`

### discoverServices

    protected List discoverServices(org.hyperic.util.config.ConfigResponse config)
                             throws PluginException

  Description copied from class: `ServerDetector`
  Override to discover services for the server type of the plugin instance.

  Overrides:
    `discoverServices` in class `ServerDetector`
  Parameters:
    `config` - Configuration of the parent server resource.
  Returns:
    List of type ServiceResource.
  Throws:
    `PluginException` - If an error occured during discovery.

### getFileResources

    protected List getFileResources(org.hyperic.util.config.ConfigResponse platformConfig)
                             throws PluginException

  Check for installed files using the file-scan config without running a full file-scan.

  Throws:
    `PluginException`

### getProcessResources

    protected List getProcessResources(org.hyperic.util.config.ConfigResponse platformConfig)
                                throws PluginException

  Process table scan

  Throws:
    `PluginException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.5.3.1
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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