Class JmxAttributeGauge

java.lang.Object
io.dropwizard.metrics5.jvm.JmxAttributeGauge
All Implemented Interfaces:
io.dropwizard.metrics5.Gauge<Object>, io.dropwizard.metrics5.Metric

public class JmxAttributeGauge extends Object implements io.dropwizard.metrics5.Gauge<Object>
A Gauge implementation which queries an MBeanServerConnection for an attribute of an object.
  • Constructor Details

    • JmxAttributeGauge

      public JmxAttributeGauge(ObjectName objectName, String attributeName)
      Creates a new JmxAttributeGauge.
      Parameters:
      objectName - the name of the object
      attributeName - the name of the object's attribute
    • JmxAttributeGauge

      public JmxAttributeGauge(MBeanServerConnection mBeanServerConn, ObjectName objectName, String attributeName)
      Creates a new JmxAttributeGauge.
      Parameters:
      mBeanServerConn - the MBeanServerConnection
      objectName - the name of the object
      attributeName - the name of the object's attribute
  • Method Details

    • getValue

      public Object getValue()
      Specified by:
      getValue in interface io.dropwizard.metrics5.Gauge<Object>