Package com.codahale.metrics.servlets
Class HealthCheckServlet.ContextListener
- java.lang.Object
-
- com.codahale.metrics.servlets.HealthCheckServlet.ContextListener
-
- All Implemented Interfaces:
java.util.EventListener,javax.servlet.ServletContextListener
- Enclosing class:
- HealthCheckServlet
public abstract static class HealthCheckServlet.ContextListener extends java.lang.Object implements javax.servlet.ServletContextListener
-
-
Constructor Summary
Constructors Constructor Description ContextListener()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcontextDestroyed(javax.servlet.ServletContextEvent event)voidcontextInitialized(javax.servlet.ServletContextEvent event)protected java.util.concurrent.ExecutorServicegetExecutorService()Returns theExecutorServiceto inject into the servlet context, ornullif the health checks should be run in the servlet worker thread.protected abstract HealthCheckRegistrygetHealthCheckRegistry()Returns theHealthCheckRegistryto inject into the servlet context.
-
-
-
Method Detail
-
getHealthCheckRegistry
protected abstract HealthCheckRegistry getHealthCheckRegistry()
Returns theHealthCheckRegistryto inject into the servlet context.
-
getExecutorService
protected java.util.concurrent.ExecutorService getExecutorService()
Returns theExecutorServiceto inject into the servlet context, ornullif the health checks should be run in the servlet worker thread.
-
contextInitialized
public void contextInitialized(javax.servlet.ServletContextEvent event)
- Specified by:
contextInitializedin interfacejavax.servlet.ServletContextListener
-
contextDestroyed
public void contextDestroyed(javax.servlet.ServletContextEvent event)
- Specified by:
contextDestroyedin interfacejavax.servlet.ServletContextListener
-
-