Class InstrumentedFilterContextListener

java.lang.Object
io.dropwizard.metrics.servlet.InstrumentedFilterContextListener
All Implemented Interfaces:
jakarta.servlet.ServletContextListener, EventListener

public abstract class InstrumentedFilterContextListener extends Object implements jakarta.servlet.ServletContextListener
A listener implementation which injects a MetricRegistry instance into the servlet context. Implement getMetricRegistry() to return the MetricRegistry for your application.
  • Constructor Details

    • InstrumentedFilterContextListener

      public InstrumentedFilterContextListener()
  • Method Details

    • getMetricRegistry

      protected abstract com.codahale.metrics.MetricRegistry getMetricRegistry()
      Returns:
      the MetricRegistry to inject into the servlet context.
    • contextInitialized

      public void contextInitialized(jakarta.servlet.ServletContextEvent sce)
      Specified by:
      contextInitialized in interface jakarta.servlet.ServletContextListener
    • contextDestroyed

      public void contextDestroyed(jakarta.servlet.ServletContextEvent sce)
      Specified by:
      contextDestroyed in interface jakarta.servlet.ServletContextListener