Class InstrumentedFilterContextListener

java.lang.Object
com.codahale.metrics.servlet.InstrumentedFilterContextListener
All Implemented Interfaces:
EventListener, javax.servlet.ServletContextListener

public abstract class InstrumentedFilterContextListener extends Object implements javax.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(javax.servlet.ServletContextEvent sce)
      Specified by:
      contextInitialized in interface javax.servlet.ServletContextListener
    • contextDestroyed

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