Package alpine.server.servlets
Class HealthServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
alpine.server.servlets.HealthServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet,jakarta.servlet.ServletConfig,Serializable
public class HealthServlet
extends jakarta.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:
-
Field Summary
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPatch, doPost, doPut, doTrace, getLastModified, init, isSensitiveHeader, service, serviceMethods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, log, log
-
Constructor Details
-
HealthServlet
public HealthServlet()
-
-
Method Details
-
init
public void init() throws jakarta.servlet.ServletException- Overrides:
initin classjakarta.servlet.GenericServlet- Throws:
jakarta.servlet.ServletException
-
doGet
protected void doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws IOException - Overrides:
doGetin classjakarta.servlet.http.HttpServlet- Throws:
IOException
-