|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.espertech.esper.metrics.codahale_metrics.metrics.reporting.AbstractReporter
com.espertech.esper.metrics.codahale_metrics.metrics.reporting.JmxReporter
public class JmxReporter
A reporter which exposes application metric as JMX MBeans.
Nested Class Summary | |
---|---|
static interface |
JmxReporter.CounterMBean
|
static interface |
JmxReporter.GaugeMBean
|
static interface |
JmxReporter.HistogramMBean
|
static interface |
JmxReporter.MeterMBean
|
static interface |
JmxReporter.MetricMBean
|
static interface |
JmxReporter.TimerMBean
|
Constructor Summary | |
---|---|
JmxReporter(MetricsRegistry registry)
Creates a new JmxReporter for the given registry. |
Method Summary | |
---|---|
static JmxReporter |
getDefault()
Returns the default instance of JmxReporter if it has been started. |
void |
onMetricAdded(MetricName name,
Metric metric)
Called when a metric has been added to the MetricsRegistry . |
void |
onMetricRemoved(MetricName name)
Called when a metric has been removed from the MetricsRegistry . |
void |
processCounter(MetricName name,
Counter counter,
com.espertech.esper.metrics.codahale_metrics.metrics.reporting.JmxReporter.Context context)
Process the given counter. |
void |
processGauge(MetricName name,
Gauge gauge,
com.espertech.esper.metrics.codahale_metrics.metrics.reporting.JmxReporter.Context context)
Process the given gauge. |
void |
processHistogram(MetricName name,
Histogram histogram,
com.espertech.esper.metrics.codahale_metrics.metrics.reporting.JmxReporter.Context context)
Process the given histogram. |
void |
processMeter(MetricName name,
Metered meter,
com.espertech.esper.metrics.codahale_metrics.metrics.reporting.JmxReporter.Context context)
Process the given Metered instance. |
void |
processTimer(MetricName name,
Timer timer,
com.espertech.esper.metrics.codahale_metrics.metrics.reporting.JmxReporter.Context context)
Process the given timer. |
void |
shutdown()
Stops the reporter and closes any internal resources. |
static void |
shutdownDefault()
Stops the default instance of JmxReporter . |
void |
start()
Starts the reporter. |
static void |
startDefault(MetricsRegistry registry)
Starts the default instance of JmxReporter . |
Methods inherited from class com.espertech.esper.metrics.codahale_metrics.metrics.reporting.AbstractReporter |
---|
getMetricsRegistry |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JmxReporter(MetricsRegistry registry)
JmxReporter
for the given registry.
registry
- a MetricsRegistry
Method Detail |
---|
public static void startDefault(MetricsRegistry registry)
JmxReporter
.
registry
- the MetricsRegistry
to report frompublic static JmxReporter getDefault()
JmxReporter
if it has been started.
public static void shutdownDefault()
JmxReporter
.
public void onMetricAdded(MetricName name, Metric metric)
MetricsRegistryListener
MetricsRegistry
.
onMetricAdded
in interface MetricsRegistryListener
name
- the name of the Metric
metric
- the Metric
public void onMetricRemoved(MetricName name)
MetricsRegistryListener
MetricsRegistry
.
onMetricRemoved
in interface MetricsRegistryListener
name
- the name of the Metric
public void processMeter(MetricName name, Metered meter, com.espertech.esper.metrics.codahale_metrics.metrics.reporting.JmxReporter.Context context) throws java.lang.Exception
MetricProcessor
Metered
instance.
processMeter
in interface MetricProcessor<com.espertech.esper.metrics.codahale_metrics.metrics.reporting.JmxReporter.Context>
name
- the name of the metermeter
- the metercontext
- the context of the meter
java.lang.Exception
- if something goes wrongpublic void processCounter(MetricName name, Counter counter, com.espertech.esper.metrics.codahale_metrics.metrics.reporting.JmxReporter.Context context) throws java.lang.Exception
MetricProcessor
processCounter
in interface MetricProcessor<com.espertech.esper.metrics.codahale_metrics.metrics.reporting.JmxReporter.Context>
name
- the name of the countercounter
- the countercontext
- the context of the meter
java.lang.Exception
- if something goes wrongpublic void processHistogram(MetricName name, Histogram histogram, com.espertech.esper.metrics.codahale_metrics.metrics.reporting.JmxReporter.Context context) throws java.lang.Exception
MetricProcessor
processHistogram
in interface MetricProcessor<com.espertech.esper.metrics.codahale_metrics.metrics.reporting.JmxReporter.Context>
name
- the name of the histogramhistogram
- the histogramcontext
- the context of the meter
java.lang.Exception
- if something goes wrongpublic void processTimer(MetricName name, Timer timer, com.espertech.esper.metrics.codahale_metrics.metrics.reporting.JmxReporter.Context context) throws java.lang.Exception
MetricProcessor
processTimer
in interface MetricProcessor<com.espertech.esper.metrics.codahale_metrics.metrics.reporting.JmxReporter.Context>
name
- the name of the timertimer
- the timercontext
- the context of the meter
java.lang.Exception
- if something goes wrongpublic void processGauge(MetricName name, Gauge gauge, com.espertech.esper.metrics.codahale_metrics.metrics.reporting.JmxReporter.Context context) throws java.lang.Exception
MetricProcessor
processGauge
in interface MetricProcessor<com.espertech.esper.metrics.codahale_metrics.metrics.reporting.JmxReporter.Context>
name
- the name of the gaugegauge
- the gaugecontext
- the context of the meter
java.lang.Exception
- if something goes wrongpublic void shutdown()
AbstractReporter
shutdown
in class AbstractReporter
public final void start()
|
© 2006-2015 EsperTech Inc. All rights reserved. Visit us at espertech.com |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |