Class HealthServlet

java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
alpine.server.servlets.HealthServlet
All Implemented Interfaces:
Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class HealthServlet extends javax.servlet.http.HttpServlet
A HttpServlet exposing health information, following the MicroProfile Health specification.

Health checks can be added by implementing the HealthCheck interface, and registering implementations with the global HealthCheckRegistry instance.

HealthCheck implementations must be annotated with either Liveness, Readiness, Startup, or any combination of the same. Checks without any of those annotations will be ignored.

Since:
2.3.0
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp)
     
    void
     

    Methods inherited from class javax.servlet.http.HttpServlet

    doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service

    Methods inherited from class javax.servlet.GenericServlet

    destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • HealthServlet

      public HealthServlet()
  • Method Details

    • init

      public void init() throws javax.servlet.ServletException
      Overrides:
      init in class javax.servlet.GenericServlet
      Throws:
      javax.servlet.ServletException
    • doGet

      protected void doGet(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse resp) throws IOException
      Overrides:
      doGet in class javax.servlet.http.HttpServlet
      Throws:
      IOException