Package io.helidon.microprofile.metrics
Class DelegatingGauge<T>
- java.lang.Object
-
- io.helidon.microprofile.metrics.DelegatingGauge<T>
-
- Type Parameters:
T- data type reported by the underlyingGauge
public class DelegatingGauge<T> extends Object implements Gauge<T>
Implementation ofGaugefor cataloging in the metrics registry that delegates itsgetValue()method invocations to a discovered bean method annotated with@Gauge.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description TgetValue()static <S> DelegatingGauge<S>newInstance(Method method, Object obj, Class<S> clazz)Creates a newDelegatingGaugewhich will defer to the specified method on the object to retrieve the gauge of interest of the indicated type.
-
-
-
Method Detail
-
newInstance
public static <S> DelegatingGauge<S> newInstance(Method method, Object obj, Class<S> clazz)
Creates a newDelegatingGaugewhich will defer to the specified method on the object to retrieve the gauge of interest of the indicated type.- Type Parameters:
S- type of the underlying gauge- Parameters:
method- value-reporting method to be invoked to retrieve the gauge valueobj- bean instance from which to retrieve the gauge valueclazz- type of the underlying gauge- Returns:
DelegatingGauge
-
-