Package com.codahale.metrics
Class JmxReporter
java.lang.Object
com.codahale.metrics.JmxReporter
- All Implemented Interfaces:
Closeable
,AutoCloseable
A reporter which listens for new metrics and exposes them as namespaced MBeans.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
static class
A builder forCsvReporter
instances.private static class
static interface
private static class
static interface
private static class
static interface
private static class
private static class
static interface
(package private) static class
static interface
static interface
private static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final JmxReporter.JmxListener
private static final org.slf4j.Logger
private final MetricRegistry
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
JmxReporter
(MBeanServer mBeanServer, String domain, MetricRegistry registry, MetricFilter filter, JmxReporter.MetricTimeUnits timeUnits) -
Method Summary
Modifier and TypeMethodDescriptionvoid
close()
Stops the reporter.static JmxReporter.Builder
forRegistry
(MetricRegistry registry) Returns a newJmxReporter.Builder
forJmxReporter
.void
start()
Starts the reporter.void
stop()
Stops the reporter.
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
registry
-
listener
-
-
Constructor Details
-
JmxReporter
private JmxReporter(MBeanServer mBeanServer, String domain, MetricRegistry registry, MetricFilter filter, JmxReporter.MetricTimeUnits timeUnits)
-
-
Method Details
-
forRegistry
Returns a newJmxReporter.Builder
forJmxReporter
.- Parameters:
registry
- the registry to report- Returns:
- a
JmxReporter.Builder
instance for aJmxReporter
-
start
public void start()Starts the reporter. -
stop
public void stop()Stops the reporter. -
close
public void close()Stops the reporter.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-