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 TypeMethodDescriptionvoid
contextDestroyed
(javax.servlet.ServletContextEvent sce) void
contextInitialized
(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
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
-