Package com.codahale.metrics.servlet
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcontextDestroyed(javax.servlet.ServletContextEvent sce) voidcontextInitialized(javax.servlet.ServletContextEvent sce) protected abstract com.codahale.metrics.MetricRegistry
-
Constructor Details
-
InstrumentedFilterContextListener
public InstrumentedFilterContextListener()
-
-
Method Details
-
getMetricRegistry
protected abstract com.codahale.metrics.MetricRegistry getMetricRegistry()- Returns:
- the
MetricRegistryto inject into the servlet context.
-
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent sce) - Specified by:
contextInitializedin interfacejavax.servlet.ServletContextListener
-
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent sce) - Specified by:
contextDestroyedin interfacejavax.servlet.ServletContextListener
-