public class MonitoringCenterServlet
extends javax.servlet.http.HttpServlet
MonitoringCenter. The exposed endpoints provide the user with
an ability to retrieve metrics, health checks, information about the system and about the application. In addition,
this servlet has a ping endpoint and an endpoint that can be used to generate and display a thread dump.
In order to enable this servlet, the client application needs to declare and map it in web.xml. The mapping is up to the client, but for consistency it is recommended to map this servlet to /monitoringCenter.
The servlet documents itself at the root path--that is, sending a GET request to this servlet's root path (e.g.,
GET /monitoringCenter) will output a JSON array containing descriptions for all exposed endpoints. Also, one can
access these same descriptions programmatically via the ENDPOINT_DESCRIPTIONS constant.
| Modifier and Type | Class and Description |
|---|---|
static class |
MonitoringCenterServlet.EndpointDescription |
| Modifier and Type | Field and Description |
|---|---|
static List<MonitoringCenterServlet.EndpointDescription> |
ENDPOINT_DESCRIPTIONS |
| Constructor and Description |
|---|
MonitoringCenterServlet() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
doGet(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse) |
void |
init(javax.servlet.ServletConfig servletConfig) |
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, servicepublic static final List<MonitoringCenterServlet.EndpointDescription> ENDPOINT_DESCRIPTIONS
public void init(javax.servlet.ServletConfig servletConfig)
throws javax.servlet.ServletException
init in interface javax.servlet.Servletinit in class javax.servlet.GenericServletjavax.servlet.ServletExceptionprotected void doGet(javax.servlet.http.HttpServletRequest httpServletRequest,
javax.servlet.http.HttpServletResponse httpServletResponse)
throws javax.servlet.ServletException,
IOException
doGet in class javax.servlet.http.HttpServletjavax.servlet.ServletExceptionIOExceptionCopyright © 2016–2019. All rights reserved.