org.altlinux.jabbix
Class JabbixMetricAgent

java.lang.Object
  extended by org.altlinux.jabbix.JabbixMetricAgent
All Implemented Interfaces:
MetricAgent

public class JabbixMetricAgent
extends Object
implements MetricAgent

A MetricAgent implementation for the retrieval of some internal Jabbix program values. Currently only the following parameters can be read: "jabbix.agent.freeMemory", "jabbix.agent.maxMemory" and "jabbix.agent.totalMemory". These parameters represent the corresponding Java VM runtime parameters.

Author:
Paul Wolneykien

Constructor Summary
JabbixMetricAgent()
          Creates a new instance of this metric agent.
 
Method Summary
 JabbixMetric<?> getMetric(String key)
          Returns a metric object representing a value of a Jabbix program with the specified key.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JabbixMetricAgent

public JabbixMetricAgent()
Creates a new instance of this metric agent.

Method Detail

getMetric

public JabbixMetric<?> getMetric(String key)
                          throws JabbixException,
                                 NoSuchMetricException
Returns a metric object representing a value of a Jabbix program with the specified key.

Specified by:
getMetric in interface MetricAgent
Parameters:
key - metric key, the name of a metric
Returns:
JabbixMetric object containing the current value of a metric
Throws:
NoSuchMetricException - if no metric with the specified key is found
JabbixException - in any other error case