Class MetricsRegistryContextListener

java.lang.Object
io.dropwizard.metrics.servlets.MetricsServlet.ContextListener
org.mapfish.print.metrics.MetricsRegistryContextListener
All Implemented Interfaces:
jakarta.servlet.ServletContextListener, EventListener

public class MetricsRegistryContextListener extends io.dropwizard.metrics.servlets.MetricsServlet.ContextListener
Allows the AdminServlet to get access to the MetricRegistry so it can display the statistics via the admin servlet.
  • Constructor Details

    • MetricsRegistryContextListener

      public MetricsRegistryContextListener()
  • Method Details

    • contextInitialized

      public final void contextInitialized(jakarta.servlet.ServletContextEvent event)
      Specified by:
      contextInitialized in interface jakarta.servlet.ServletContextListener
      Overrides:
      contextInitialized in class io.dropwizard.metrics.servlets.MetricsServlet.ContextListener
    • getMetricRegistry

      protected final com.codahale.metrics.MetricRegistry getMetricRegistry()
      Specified by:
      getMetricRegistry in class io.dropwizard.metrics.servlets.MetricsServlet.ContextListener