![JAR search and dependency download from the Maven repository](/logo.png)
io.rtr.alchemy.service.metrics.JmxMetricsManaged Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alchemy-service Show documentation
Show all versions of alchemy-service Show documentation
REST service for hosting Alchemy as a service
The newest version!
package io.rtr.alchemy.service.metrics;
import com.codahale.metrics.jmx.JmxReporter;
import io.dropwizard.lifecycle.Managed;
import io.dropwizard.setup.Environment;
/** Enables logging of metrics to JMX */
public class JmxMetricsManaged implements Managed {
private final JmxReporter reporter;
public JmxMetricsManaged(Environment environment) {
reporter = JmxReporter.forRegistry(environment.metrics()).build();
}
@Override
public void start() throws Exception {
reporter.start();
}
@Override
public void stop() throws Exception {
reporter.stop();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy