com.yammer.metrics.util
Class JmxGauge
java.lang.Object
com.yammer.metrics.core.Gauge<Object>
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.
Method Summary |
Object |
value()
Returns the metric's current value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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
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.