public class JmxUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
getJmxAttribute(ObjectName targetObjectName,
String attributeName,
Class<T> attributeClass,
T defaultValue)
Retrieves the value of a JMX attribute.
|
static <T> com.codahale.metrics.Gauge<T> |
getJmxAttributeAsGauge(ObjectName targetObjectName,
String attributeName,
Class<T> attributeClass,
T gaugeDefaultValue)
Creates a Gauge representing the value of a JMX attribute.
|
public static <T> com.codahale.metrics.Gauge<T> getJmxAttributeAsGauge(ObjectName targetObjectName, String attributeName, Class<T> attributeClass, T gaugeDefaultValue)
T - type of the JMX attribute's value.targetObjectName - JMX ObjectName to query.attributeName - name of the JMX attribute.attributeClass - class of the JMX attribute's value.gaugeDefaultValue - default value to be returned by the gauge.public static <T> T getJmxAttribute(ObjectName targetObjectName, String attributeName, Class<T> attributeClass, T defaultValue)
T - type of the JMX attribute's value.targetObjectName - JMX ObjectName to query.attributeName - name of the JMX attribute.attributeClass - class of the JMX attribute's value.defaultValue - default value to be returned if the JMX attribute is absent or of different type.Copyright © 2016. All rights reserved.