Package io.dropwizard.metrics5.jvm
Class JmxAttributeGauge
java.lang.Object
io.dropwizard.metrics5.jvm.JmxAttributeGauge
- All Implemented Interfaces:
io.dropwizard.metrics5.Gauge<Object>,io.dropwizard.metrics5.Metric
A
Gauge implementation which queries an MBeanServerConnection for an attribute of an object.-
Constructor Summary
ConstructorsConstructorDescriptionJmxAttributeGauge(MBeanServerConnection mBeanServerConn, ObjectName objectName, String attributeName) Creates a new JmxAttributeGauge.JmxAttributeGauge(ObjectName objectName, String attributeName) Creates a new JmxAttributeGauge. -
Method Summary
-
Constructor Details
-
JmxAttributeGauge
Creates a new JmxAttributeGauge.- Parameters:
objectName- the name of the objectattributeName- the name of the object's attribute
-
JmxAttributeGauge
public JmxAttributeGauge(MBeanServerConnection mBeanServerConn, ObjectName objectName, String attributeName) Creates a new JmxAttributeGauge.- Parameters:
mBeanServerConn- theMBeanServerConnectionobjectName- the name of the objectattributeName- the name of the object's attribute
-
-
Method Details
-
getValue
- Specified by:
getValuein interfaceio.dropwizard.metrics5.Gauge<Object>
-