Class HealthCheckServlet.ContextListener

  • All Implemented Interfaces:
    jakarta.servlet.ServletContextListener, EventListener
    Enclosing class:
    HealthCheckServlet

    public abstract static class HealthCheckServlet.ContextListener
    extends Object
    implements jakarta.servlet.ServletContextListener
    • Constructor Detail

      • ContextListener

        public ContextListener()
    • Method Detail

      • getHealthCheckRegistry

        protected abstract io.dropwizard.metrics5.health.HealthCheckRegistry getHealthCheckRegistry()
        Returns:
        the HealthCheckRegistry to inject into the servlet context.
      • getExecutorService

        protected ExecutorService getExecutorService()
        Returns:
        the ExecutorService to inject into the servlet context, or null if the health checks should be run in the servlet worker thread.
      • getHealthCheckFilter

        protected io.dropwizard.metrics5.health.HealthCheckFilter getHealthCheckFilter()
        Returns:
        the HealthCheckFilter that shall be used to filter health checks, or HealthCheckFilter.ALL if the default should be used.
      • getObjectMapper

        protected com.fasterxml.jackson.databind.ObjectMapper getObjectMapper()
        Returns:
        the ObjectMapper that shall be used to render health checks, or null if the default object mapper should be used.
      • contextInitialized

        public void contextInitialized​(jakarta.servlet.ServletContextEvent event)
        Specified by:
        contextInitialized in interface jakarta.servlet.ServletContextListener
      • contextDestroyed

        public void contextDestroyed​(jakarta.servlet.ServletContextEvent event)
        Specified by:
        contextDestroyed in interface jakarta.servlet.ServletContextListener