public class HealthCheckServlet
extends javax.servlet.http.HttpServlet
HealthCheckRegistry
and prints the results as a text/plain entity. Only responds to GET requests.
If the servlet context has an attribute named
com.yammer.metrics.reporting.HealthCheckServlet.registry which is a
HealthCheckRegistry instance, HealthCheckServlet will use it instead of
HealthChecks.| Modifier and Type | Field and Description |
|---|---|
static String |
REGISTRY_ATTRIBUTE
The attribute name of the
HealthCheckRegistry instance in the servlet context. |
| Constructor and Description |
|---|
HealthCheckServlet()
Creates a new
HealthCheckServlet with the default HealthCheckRegistry. |
HealthCheckServlet(HealthCheckRegistry registry)
Creates a new
HealthCheckServlet with the given HealthCheckRegistry. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp) |
void |
init(javax.servlet.ServletConfig config) |
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, servicepublic static final String REGISTRY_ATTRIBUTE
HealthCheckRegistry instance in the servlet context.public HealthCheckServlet(HealthCheckRegistry registry)
HealthCheckServlet with the given HealthCheckRegistry.registry - a HealthCheckRegistrypublic HealthCheckServlet()
HealthCheckServlet with the default HealthCheckRegistry.public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException
init in interface javax.servlet.Servletinit in class javax.servlet.GenericServletjavax.servlet.ServletExceptionprotected void doGet(javax.servlet.http.HttpServletRequest req,
javax.servlet.http.HttpServletResponse resp)
throws javax.servlet.ServletException,
IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionCopyright © 2012. All Rights Reserved.