com.yammer.metrics.util
Class JmxGauge

java.lang.Object
  extended by com.yammer.metrics.core.Gauge<Object>
      extended by com.yammer.metrics.util.JmxGauge
All Implemented Interfaces:
Metric

public class JmxGauge
extends Gauge<Object>

A gauge which exposes an attribute of a JMX MBean.


Constructor Summary
JmxGauge(ObjectName objectName, String attribute)
          Creates a new JmxGauge for the given attribute of the given MBean.
JmxGauge(String objectName, String attribute)
          Creates a new JmxGauge for the given attribute of the given MBean.
 
Method Summary
 Object value()
          Returns the metric's current value.
 
Methods inherited from class com.yammer.metrics.core.Gauge
processWith
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JmxGauge

public JmxGauge(String objectName,
                String attribute)
         throws MalformedObjectNameException
Creates a new JmxGauge for the given attribute of the given MBean.

Parameters:
objectName - the string value of the MBean's ObjectName
attribute - the MBean attribute's name
Throws:
MalformedObjectNameException - if objectName is malformed

JmxGauge

public JmxGauge(ObjectName objectName,
                String attribute)
Creates a new JmxGauge for the given attribute of the given MBean.

Parameters:
objectName - the MBean's ObjectName
attribute - the MBean attribute's name
Method Detail

value

public Object value()
Description copied from class: Gauge
Returns the metric's current value.

Specified by:
value in class Gauge<Object>
Returns:
the metric's current value


Copyright © 2012. All Rights Reserved.