Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
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, INSTALLPATH_MATCH, INSTALLPATH_NOMATCH, INVENTORY_ID, VERSION_FILE`

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

### isSwitch

    protected boolean isSwitch(java.lang.String arg)

### getProcOpts

    protected java.util.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,
                                               java.lang.String exe)

### newServerResource

    protected ServerResource newServerResource(java.lang.String exe)

### setPlatformConfig

    protected void setPlatformConfig(ConfigResponse config)

### getPlatformConfig

    protected ConfigResponse getPlatformConfig()

### getServerResources

    public java.util.List getServerResources(ConfigResponse platformConfig)
                                      throws PluginException

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

### getServerResources

    public java.util.List getServerResources(ConfigResponse platformConfig,
                                             java.lang.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 java.util.List discoverServices(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 java.util.List getFileResources(ConfigResponse platformConfig)
                                       throws PluginException

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

  Throws:
    `PluginException`

### getProcessResources

    protected java.util.List getProcessResources(ConfigResponse platformConfig)
                                          throws PluginException

  Process table scan

  Throws:
    `PluginException`

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

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