Collector (Hyperic HQ Plugin API)
Keywords: org.hyperic.hq.product.Collector class

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 Collector

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

All Implemented Interfaces:
  java.lang.Runnable

Direct Known Subclasses:
  ExecutableProcess

    public abstract class Collector

extends java.lang.Object
implements java.lang.Runnable

Field Summary
`static java.lang.String` | `ATTR_RESPONSE_CODE`
`static java.lang.String` | `ATTR_RESPONSE_TIME`
`static java.lang.String` | `DEFAULT_FTP_PORT`
`static java.lang.String` | `DEFAULT_HOSTNAME`
`static java.lang.String` | `DEFAULT_HTTP_PORT`
`static java.lang.String` | `DEFAULT_HTTPS_PORT`
`static java.lang.String` | `METHOD_GET`
`static java.lang.String` | `METHOD_HEAD`
`static java.lang.String` | `PROP_FOLLOW`
`static java.lang.String` | `PROP_HOSTNAME`
`static java.lang.String` | `PROP_METHOD`
`static java.lang.String` | `PROP_PASSWORD`
`static java.lang.String` | `PROP_PATH`
`static java.lang.String` | `PROP_PORT`
`static java.lang.String` | `PROP_PROTOCOL`
`static java.lang.String` | `PROP_REALM`
`static java.lang.String` | `PROP_SSL`
`static java.lang.String` | `PROP_SSL_PROTOCOL`
`static java.lang.String` | `PROP_SSLPORT`
`static java.lang.String` | `PROP_TIMEOUT`
`static java.lang.String` | `PROP_USERNAME`
`static java.lang.String` | `PROTOCOL_FTP`
`static java.lang.String` | `PROTOCOL_HTTP`
`static java.lang.String` | `PROTOCOL_HTTPS`
`static java.lang.String` | `PROTOCOL_SOCKET`

Constructor Summary
`Collector()`

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

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

Field Detail

### PROP_HOSTNAME

    public static final java.lang.String PROP_HOSTNAME

See Also:
  Constant Field Values

### PROP_PORT

    public static final java.lang.String PROP_PORT

See Also:
  Constant Field Values

### PROP_PROTOCOL

    public static final java.lang.String PROP_PROTOCOL

See Also:
  Constant Field Values

### PROP_PATH

    public static final java.lang.String PROP_PATH

See Also:
  Constant Field Values

### PROP_SSL

    public static final java.lang.String PROP_SSL

See Also:
  Constant Field Values

### PROP_SSL_PROTOCOL

    public static final java.lang.String PROP_SSL_PROTOCOL

See Also:
  Constant Field Values

### PROP_USERNAME

    public static final java.lang.String PROP_USERNAME

See Also:
  Constant Field Values

### PROP_PASSWORD

    public static final java.lang.String PROP_PASSWORD

See Also:
  Constant Field Values

### PROP_REALM

    public static final java.lang.String PROP_REALM

See Also:
  Constant Field Values

### PROP_FOLLOW

    public static final java.lang.String PROP_FOLLOW

See Also:
  Constant Field Values

### PROP_METHOD

    public static final java.lang.String PROP_METHOD

See Also:
  Constant Field Values

### PROP_SSLPORT

    public static final java.lang.String PROP_SSLPORT

See Also:
  Constant Field Values

### METHOD_HEAD

    public static final java.lang.String METHOD_HEAD

See Also:
  Constant Field Values

### METHOD_GET

    public static final java.lang.String METHOD_GET

See Also:
  Constant Field Values

### PROTOCOL_HTTP

    public static final java.lang.String PROTOCOL_HTTP

See Also:
  Constant Field Values

### PROTOCOL_HTTPS

    public static final java.lang.String PROTOCOL_HTTPS

See Also:
  Constant Field Values

### PROTOCOL_FTP

    public static final java.lang.String PROTOCOL_FTP

See Also:
  Constant Field Values

### PROTOCOL_SOCKET

    public static final java.lang.String PROTOCOL_SOCKET

See Also:
  Constant Field Values

### DEFAULT_HOSTNAME

    public static final java.lang.String DEFAULT_HOSTNAME

See Also:
  Constant Field Values

### DEFAULT_FTP_PORT

    public static final java.lang.String DEFAULT_FTP_PORT

See Also:
  Constant Field Values

### DEFAULT_HTTP_PORT

    public static final java.lang.String DEFAULT_HTTP_PORT

See Also:
  Constant Field Values

### DEFAULT_HTTPS_PORT

    public static final java.lang.String DEFAULT_HTTPS_PORT

See Also:
  Constant Field Values

### PROP_TIMEOUT

    public static final java.lang.String PROP_TIMEOUT

See Also:
  Constant Field Values

### ATTR_RESPONSE_TIME

    public static final java.lang.String ATTR_RESPONSE_TIME

See Also:
  Constant Field Values

### ATTR_RESPONSE_CODE

    public static final java.lang.String ATTR_RESPONSE_CODE

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,
                     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 java.util.Map getValues(GenericPlugin plugin,
                                   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 java.lang.String getPropTimeout()

### getIntegerProperty

    protected int getIntegerProperty(java.lang.String key,
                                     int defVal)

### getCollectorProperty

    protected java.lang.String getCollectorProperty(java.lang.String key,
                                                    java.lang.String defVal)

### getCollectorProperty

    protected java.lang.String getCollectorProperty(java.lang.String key)

### setProperties

    protected void setProperties(java.util.Properties props)

### getProperties

    protected java.util.Properties getProperties()

### getPlugin

    protected GenericPlugin getPlugin()

### setSource

    protected void setSource(java.lang.String value)

### getSource

    protected java.lang.String getSource()

### setLogLevel

    protected void setLogLevel(int value)

### getLogLevel

    protected int getLogLevel()

### setMessage

    protected void setMessage(java.lang.String value)

### getMessage

    protected java.lang.String getMessage()

### setMessage

    protected void setMessage(java.lang.String msg,
                              java.lang.Throwable t)

### setErrorMessage

    protected void setErrorMessage(java.lang.String msg)

### setWarningMessage

    protected void setWarningMessage(java.lang.String msg)

### setInfoMessage

    protected void setInfoMessage(java.lang.String msg)

### setDebugMessage

    protected void setDebugMessage(java.lang.String msg)

### setErrorMessage

    protected void setErrorMessage(java.lang.String msg,
                                   java.lang.Throwable t)

### setWarningMessage

    protected void setWarningMessage(java.lang.String msg,
                                     java.lang.Throwable t)

### setInfoMessage

    protected void setInfoMessage(java.lang.String msg,
                                  java.lang.Throwable t)

### setDebugMessage

    protected void setDebugMessage(java.lang.String msg,
                                   java.lang.Throwable t)

### setValue

    protected void setValue(java.lang.String key,
                            java.lang.String val)

### addValues

    protected void addValues(java.util.Map values)

### getResult

    protected CollectorResult getResult()

### setValue

    protected void setValue(java.lang.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 java.lang.String toString()

  Overrides:
    `toString` in class `java.lang.Object`

### getValue

    public MetricValue getValue(Metric metric,
                                CollectorResult result)

### setInterval

    protected void setInterval(MeasurementPlugin plugin,
                               Metric metric)

### getValue

    public static MetricValue getValue(MeasurementPlugin plugin,
                                       Metric metric)
                                throws PluginException,
                                       MetricNotFoundException,
                                       MetricUnreachableException

  Throws:
    `PluginException`
    `MetricNotFoundException`
    `MetricUnreachableException`

### equals

    public boolean equals(java.lang.Object obj)

  Overrides:
    `equals` in class `java.lang.Object`

### hashCode

    public int hashCode()

  Overrides:
    `hashCode` in class `java.lang.Object`

### isPoolable

    public boolean isPoolable()

### run

    public void run()

  Specified by:
    `run` in interface `java.lang.Runnable`

### parseResults

    protected void parseResults(java.lang.String message)

### main

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

  Throws:
    `java.lang.Exception`

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.