Hyperic HQ Plugin API v. 2.5.dev

## net.hyperic.hq.product
Class Metric

    java.lang.Object
      net.hyperic.hq.product.Metric

public class Metric
extends java.lang.Object

this class parses Metrics in the form of: jmx-domain:jmx-properties:jmx-attribute:metric-properties For example: jboss.system:type=ServerInfo,lang=eng:FreeMemory:naming=jnp://localhost:1099,password=xxx where: jmx-domain = jboss.system jmx-properties = type=ServerInfo,lang=eng jmx-attribute = FreeMemory metric-properties = naming=jnp://localhost:1099,password=xxx

Field Summary
`static double` `AVAIL_DOWN`
`static double` `AVAIL_PAUSED`
`static double` `AVAIL_UNKNOWN`
`static double` `AVAIL_UP`
`static double` `AVAIL_WARN`

Method Summary
`static java.lang.String` `configTemplate(java.lang.String[] props)`
`static java.lang.String` `decode(java.lang.String val)`
`static java.lang.String` `encode(java.lang.String val)`
`java.lang.String` `getAttributeName()` The attribute name
`java.lang.String` `getDomainName()` The domain name - corresponding the the ObjectName domain.
`java.lang.String` `getId()`
`java.lang.String` `getObjectName()` The full JMX object name - domain : objectName
`java.util.Properties` `getObjectProperties()` Properties in the local part of the ObjectName.
`java.lang.String` `getObjectProperty(java.lang.String property)`
`java.lang.String` `getObjectPropString()` The local part of the ObjectName.
`java.util.Properties` `getProperties()`
`java.lang.String` `getPropString()`
`static void` `main(java.lang.String[] args)`
`static Metric` `parse(java.lang.String template)`
`void` `setDomainName(java.lang.String domain)`
`void` `setId(int type, int id)`
`void` `setObjectName(java.lang.String objectName)` Set the JMX object name.
`void` `setPropString(java.lang.String propString)`
`java.lang.String` `toString()`
`static java.lang.String` `translate(java.lang.String template, ConfigResponse config)`
`static java.lang.String` `translate(java.lang.String template, java.util.Properties props)`

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

Field Detail

### AVAIL_UNKNOWN

    public static final double AVAIL_UNKNOWN

See Also:
  Constant Field Values

### AVAIL_UP

    public static final double AVAIL_UP

See Also:
  Constant Field Values

### AVAIL_DOWN

    public static final double AVAIL_DOWN

See Also:
  Constant Field Values

### AVAIL_WARN

    public static final double AVAIL_WARN

See Also:
  Constant Field Values

### AVAIL_PAUSED

    public static final double AVAIL_PAUSED

See Also:
  Constant Field Values

Method Detail

### encode

    public static java.lang.String encode(java.lang.String val)

### decode

    public static java.lang.String decode(java.lang.String val)

### getDomainName

    public java.lang.String getDomainName()

  The domain name - corresponding the the ObjectName domain.

### setDomainName

    public void setDomainName(java.lang.String domain)

### getObjectName

    public java.lang.String getObjectName()

  The full JMX object name - domain : objectName

### setObjectName

    public void setObjectName(java.lang.String objectName)

  Set the JMX object name.

### getAttributeName

    public java.lang.String getAttributeName()

  The attribute name

### toString

    public java.lang.String toString()

### getProperties

    public java.util.Properties getProperties()

### setPropString

    public void setPropString(java.lang.String propString)

### getPropString

    public java.lang.String getPropString()

### getObjectProperty

    public java.lang.String getObjectProperty(java.lang.String property)

### getObjectProperties

    public java.util.Properties getObjectProperties()

  Properties in the local part of the ObjectName.

### getObjectPropString

    public java.lang.String getObjectPropString()

  The local part of the ObjectName.

### getId

    public java.lang.String getId()

### setId

    public void setId(int type,
                      int id)

### parse

    public static Metric parse(java.lang.String template)
                        throws MetricInvalidException

  Parameters:
    `template` - The metric string to be parsed.
  Returns:
    A Metric that can be used by the plugins.
  Throws:
    `MetricInvalidException` - If the metric string is malformed.

### translate

    public static java.lang.String translate(java.lang.String template,
                                             ConfigResponse config)

### translate

    public static java.lang.String translate(java.lang.String template,
                                             java.util.Properties props)

### configTemplate

    public static java.lang.String configTemplate(java.lang.String[] props)

### main

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

  Throws:
    `java.lang.Exception`

Hyperic HQ Plugin API v. 2.5.dev

Copyright © 2004-2005 Hyperic LLC support@hyperic.net, All Rights Reserved.