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 Metric

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

    public class Metric

extends 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 String` | `ATTR_AVAIL`
`static double` | `AVAIL_DOWN`
`static double` | `AVAIL_PAUSED`
`static double` | `AVAIL_POWERED_OFF`
`static double` | `AVAIL_UNKNOWN`
`static double` | `AVAIL_UP`
`static double` | `AVAIL_WARN`

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

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

Field Detail

### ATTR_AVAIL

    public static final String ATTR_AVAIL

See Also:
  Constant Field Values

### 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

### AVAIL_POWERED_OFF

    public static final double AVAIL_POWERED_OFF

See Also:
  Constant Field Values

Method Detail

### encode

    public static String encode(String val)

### decode

    public static String decode(String val)

### getDomainName

    public String getDomainName()

  The domain name - corresponding the the ObjectName domain.

### setDomainName

    public void setDomainName(String domain)

### getObjectName

    public String getObjectName()

  The full JMX object name - domain : objectName

### setObjectName

    public void setObjectName(String objectName)

  Set the JMX object name.

### getAttributeName

    public String getAttributeName()

  The attribute name

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### toDebugString

    public String toDebugString()

### getProperties

    public Properties getProperties()

### setPropString

    public void setPropString(String propString)

### getPropString

    public String getPropString()

### getObjectProperty

    public String getObjectProperty(String property)

### getObjectProperties

    public Properties getObjectProperties()

  Properties in the local part of the ObjectName.

### getObjectPropString

    public String getObjectPropString()

  The local part of the ObjectName.

### getId

    public String getId()

### setId

    public void setId(int type,
                      int id)

### getCategory

    public String getCategory()

### setCategory

    public void setCategory(String category)

### getInterval

    public long getInterval()

### setInterval

    public void setInterval(long interval)

### isAvail

    public boolean isAvail()

### parse

    public static Metric parse(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 String translate(String template,
                                   org.hyperic.util.config.ConfigResponse config)

### translate

    public static String translate(String template,
                                   Properties props)

### configTemplate

    public static String configTemplate(String[] props)

### 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.