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

## org.hyperic.hq.product
Class Collector

    java.lang.Object
      org.hyperic.hq.product.Collector

All Implemented Interfaces:
  Runnable

Direct Known Subclasses:
  ExecutableProcess

    public abstract class Collector

extends Object
implements Runnable

Field Summary
`static String` | `ALLOW_REMOVE`
`static String` | `ATTR_RESPONSE_CODE`
`static String` | `ATTR_RESPONSE_TIME`
`static String` | `DEFAULT_FTP_PORT`
`static String` | `DEFAULT_HOSTNAME`
`static String` | `DEFAULT_HTTP_PORT`
`static String` | `DEFAULT_HTTPS_PORT`
`static String` | `GUID`
`static String` | `LISTEN_PORTS`
`static String` | `MAC`
`static String` | `METHOD_GET`
`static String` | `METHOD_HEAD`
`static String` | `PROP_FOLLOW`
`static String` | `PROP_HOSTNAME`
`static String` | `PROP_METHOD`
`static String` | `PROP_PASSWORD`
`static String` | `PROP_PATH`
`static String` | `PROP_PORT`
`static String` | `PROP_PROTOCOL`
`static String` | `PROP_REALM`
`static String` | `PROP_SSL`
`static String` | `PROP_SSL_PROTOCOL`
`static String` | `PROP_SSLPORT`
`static String` | `PROP_TIMEOUT`
`static String` | `PROP_USERNAME`
`static String` | `PROTOCOL_FTP`
`static String` | `PROTOCOL_HTTP`
`static String` | `PROTOCOL_HTTPS`
`static String` | `PROTOCOL_SOCKET`
`static String` | `REMOVABLE`

Constructor Summary
`Collector()`

Method Summary
`protected void` | `addValues(Map values)`
`abstract void` | `collect()`
`protected void` | `endTime()`
`boolean` | `equals(Object obj)`
`protected String` | `getCollectorProperty(String key)`
`protected String` | `getCollectorProperty(String key, String defVal)`
`static Collection<Collector>` | `getCollectorsToExecute()`
`protected int` | `getDefaultTimeout()`
`protected int` | `getIntegerProperty(String key, int defVal)`
`protected int` | `getLogLevel()`
`protected String` | `getMessage()`
`protected GenericPlugin` | `getPlugin()`
`protected Properties` | `getProperties()`
`protected String` | `getPropTimeout()`
`protected CollectorResult` | `getResult()`
`protected String` | `getSource()`
`int` | `getTimeout()`
`int` | `getTimeoutMillis()`
`static org.hyperic.hq.product.MetricValue` | `getValue(MeasurementPlugin plugin, Metric metric)`
`org.hyperic.hq.product.MetricValue` | `getValue(Metric metric, CollectorResult result)`
`Map` | `getValues(GenericPlugin plugin, org.hyperic.util.config.ConfigResponse config)` Initialize and collect values for use outside of MeasurementPlugin.
`int` | `hashCode()`
`protected void` | `init()`
`void` | `init(GenericPlugin plugin, org.hyperic.util.config.ConfigResponse config)` Initialize a Collector instance for use outside of MeasurementPlugin.
`boolean` | `isPoolable()`
`static void` | `main(String[] args)`
`protected void` | `parseResults(String message)`
`void` | `run()`
`protected void` | `setAvailability(boolean val)`
`protected void` | `setAvailability(double val)`
`protected void` | `setDebugMessage(String msg)`
`protected void` | `setDebugMessage(String msg, Throwable t)`
`protected void` | `setErrorMessage(String msg)`
`protected void` | `setErrorMessage(String msg, Throwable t)`
`protected void` | `setInfoMessage(String msg)`
`protected void` | `setInfoMessage(String msg, Throwable t)`
`protected void` | `setInterval(MeasurementPlugin plugin, Metric metric)`
`protected void` | `setLogLevel(int value)`
`protected void` | `setMessage(String value)`
`protected void` | `setMessage(String msg, Throwable t)`
`protected void` | `setProperties(Properties props)`
`protected void` | `setResponseCode(int code)`
`protected void` | `setResponseTime(double value)`
`protected void` | `setSource(String value)`
`protected void` | `setValue(String key, double val)`
`protected void` | `setValue(String key, String val)`
`protected void` | `setWarningMessage(String msg)`
`protected void` | `setWarningMessage(String msg, Throwable t)`
`protected void` | `startTime()`
`String` | `toString()`

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

Field Detail

### PROP_HOSTNAME

    public static final String PROP_HOSTNAME

See Also:
  Constant Field Values

### PROP_PORT

    public static final String PROP_PORT

See Also:
  Constant Field Values

### PROP_PROTOCOL

    public static final String PROP_PROTOCOL

See Also:
  Constant Field Values

### PROP_PATH

    public static final String PROP_PATH

See Also:
  Constant Field Values

### PROP_SSL

    public static final String PROP_SSL

See Also:
  Constant Field Values

### PROP_SSL_PROTOCOL

    public static final String PROP_SSL_PROTOCOL

See Also:
  Constant Field Values

### PROP_USERNAME

    public static final String PROP_USERNAME

See Also:
  Constant Field Values

### PROP_PASSWORD

    public static final String PROP_PASSWORD

See Also:
  Constant Field Values

### PROP_REALM

    public static final String PROP_REALM

See Also:
  Constant Field Values

### PROP_FOLLOW

    public static final String PROP_FOLLOW

See Also:
  Constant Field Values

### PROP_METHOD

    public static final String PROP_METHOD

See Also:
  Constant Field Values

### PROP_SSLPORT

    public static final String PROP_SSLPORT

See Also:
  Constant Field Values

### METHOD_HEAD

    public static final String METHOD_HEAD

See Also:
  Constant Field Values

### METHOD_GET

    public static final String METHOD_GET

See Also:
  Constant Field Values

### PROTOCOL_HTTP

    public static final String PROTOCOL_HTTP

See Also:
  Constant Field Values

### PROTOCOL_HTTPS

    public static final String PROTOCOL_HTTPS

See Also:
  Constant Field Values

### PROTOCOL_FTP

    public static final String PROTOCOL_FTP

See Also:
  Constant Field Values

### PROTOCOL_SOCKET

    public static final String PROTOCOL_SOCKET

See Also:
  Constant Field Values

### DEFAULT_HOSTNAME

    public static final String DEFAULT_HOSTNAME

See Also:
  Constant Field Values

### DEFAULT_FTP_PORT

    public static final String DEFAULT_FTP_PORT

See Also:
  Constant Field Values

### DEFAULT_HTTP_PORT

    public static final String DEFAULT_HTTP_PORT

See Also:
  Constant Field Values

### DEFAULT_HTTPS_PORT

    public static final String DEFAULT_HTTPS_PORT

See Also:
  Constant Field Values

### PROP_TIMEOUT

    public static final String PROP_TIMEOUT

See Also:
  Constant Field Values

### ATTR_RESPONSE_TIME

    public static final String ATTR_RESPONSE_TIME

See Also:
  Constant Field Values

### ATTR_RESPONSE_CODE

    public static final String ATTR_RESPONSE_CODE

See Also:
  Constant Field Values

### LISTEN_PORTS

    public static final String LISTEN_PORTS

See Also:
  Constant Field Values

### GUID

    public static final String GUID

See Also:
  Constant Field Values

### MAC

    public static final String MAC

See Also:
  Constant Field Values

### REMOVABLE

    public static final String REMOVABLE

See Also:
  Constant Field Values

### ALLOW_REMOVE

    public static final String ALLOW_REMOVE

See Also:
  Constant Field Values

Constructor Detail

### Collector

    public Collector()

Method Detail

### init

    protected void init()
                 throws PluginException

  Throws:
    `PluginException`

### collect

    public abstract void collect()

### init

    public void init(GenericPlugin plugin,
                     org.hyperic.util.config.ConfigResponse config)
              throws PluginException

  Initialize a Collector instance for use outside of MeasurementPlugin. Collectors are generally used for metric collection, but can also be used in some cases for inventory property discovery and/or control.

  Parameters:
    `plugin` - A ServerDetector or ControlPlugin
    `config` - Resource configuration properties
  Throws:
    `PluginException`

### getValues

    public Map getValues(GenericPlugin plugin,
                         org.hyperic.util.config.ConfigResponse config)
                  throws PluginException

  Initialize and collect values for use outside of MeasurementPlugin. This method is useful for inventory property discovery.

  Parameters:
    `plugin` - A ServerDetector or ControlPlugin
    `config` -
  Returns:
    Resource configuration properties
  Throws:
    `PluginException`

### getTimeout

    public int getTimeout()

### getTimeoutMillis

    public int getTimeoutMillis()

### getDefaultTimeout

    protected int getDefaultTimeout()

### getPropTimeout

    protected String getPropTimeout()

### getIntegerProperty

    protected int getIntegerProperty(String key,
                                     int defVal)

### getCollectorProperty

    protected String getCollectorProperty(String key,
                                          String defVal)

### getCollectorProperty

    protected String getCollectorProperty(String key)

### setProperties

    protected void setProperties(Properties props)

### getProperties

    protected Properties getProperties()

### getPlugin

    protected GenericPlugin getPlugin()

### setSource

    protected void setSource(String value)

### getSource

    protected String getSource()

### setLogLevel

    protected void setLogLevel(int value)

### getLogLevel

    protected int getLogLevel()

### setMessage

    protected void setMessage(String value)

### getMessage

    protected String getMessage()

### setMessage

    protected void setMessage(String msg,
                              Throwable t)

### setErrorMessage

    protected void setErrorMessage(String msg)

### setWarningMessage

    protected void setWarningMessage(String msg)

### setInfoMessage

    protected void setInfoMessage(String msg)

### setDebugMessage

    protected void setDebugMessage(String msg)

### setErrorMessage

    protected void setErrorMessage(String msg,
                                   Throwable t)

### setWarningMessage

    protected void setWarningMessage(String msg,
                                     Throwable t)

### setInfoMessage

    protected void setInfoMessage(String msg,
                                  Throwable t)

### setDebugMessage

    protected void setDebugMessage(String msg,
                                   Throwable t)

### setValue

    protected void setValue(String key,
                            String val)

### addValues

    protected void addValues(Map values)

### getResult

    protected CollectorResult getResult()

### setValue

    protected void setValue(String key,
                            double val)

### setAvailability

    protected void setAvailability(double val)

### setAvailability

    protected void setAvailability(boolean val)

### setResponseCode

    protected void setResponseCode(int code)

### setResponseTime

    protected void setResponseTime(double value)

### startTime

    protected void startTime()

### endTime

    protected void endTime()

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### getValue

    public org.hyperic.hq.product.MetricValue getValue(Metric metric,
                                                       CollectorResult result)

### setInterval

    protected void setInterval(MeasurementPlugin plugin,
                               Metric metric)

### getValue

    public static org.hyperic.hq.product.MetricValue getValue(MeasurementPlugin plugin,
                                                              Metric metric)
                                                       throws PluginException,
                                                              MetricNotFoundException,
                                                              MetricUnreachableException

  Throws:
    `PluginException`
    `MetricNotFoundException`
    `MetricUnreachableException`

### equals

    public boolean equals(Object obj)

  Overrides:
    `equals` in class `Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `Object`

### isPoolable

    public boolean isPoolable()

### run

    public void run()

  Specified by:
    `run` in interface `Runnable`

### parseResults

    protected void parseResults(String message)

### getCollectorsToExecute

    public static Collection<Collector> getCollectorsToExecute()

### main

    public static void main(String[] args)
                     throws Exception

  Throws:
    `Exception`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 5.8.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.