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 aMetricRegistry
instance into the servlet context. ImplementgetMetricRegistry()
to return theMetricRegistry
for your application.
-
-
Constructor Summary
Constructors Constructor Description InstrumentedFilterContextListener()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
contextDestroyed(javax.servlet.ServletContextEvent sce)
void
contextInitialized(javax.servlet.ServletContextEvent sce)
protected abstract MetricRegistry
getMetricRegistry()
-
-
-
Method Detail
-
getMetricRegistry
protected abstract MetricRegistry getMetricRegistry()
- Returns:
- the
MetricRegistry
to inject into the servlet context.
-
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent sce)
- Specified by:
contextInitialized
in interfacejavax.servlet.ServletContextListener
-
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent sce)
- Specified by:
contextDestroyed
in interfacejavax.servlet.ServletContextListener
-
-