Package com.nimbusds.common.servlet
Class MonitorServlet
java.lang.Object
jakarta.servlet.GenericServlet
jakarta.servlet.http.HttpServlet
io.dropwizard.metrics.servlets.AdminServlet
com.nimbusds.common.servlet.MonitorServlet
- All Implemented Interfaces:
jakarta.servlet.Servlet
,jakarta.servlet.ServletConfig
,Serializable
Monitor servlet for exposing Dropwizard metrics and health checks, requires
an OAuth 2.0 bearer token for access.
The access token is defined by a
Java property
obtained
from 1) system properties or from 2) a properties file specified by
servlet context parameter
.
- See Also:
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
The monitor servlet access token configuration. -
Field Summary
Modifier and TypeFieldDescriptionprotected MasterAccessTokenValidator
The access token validator.Fields inherited from class io.dropwizard.metrics.servlets.AdminServlet
CPU_PROFILE_ENABLED_PARAM_KEY, CPU_PROFILE_URI_PARAM_KEY, DEFAULT_CPU_PROFILE_URI, DEFAULT_HEALTHCHECK_URI, DEFAULT_METRICS_URI, DEFAULT_PING_URI, DEFAULT_THREADS_URI, HEALTHCHECK_ENABLED_PARAM_KEY, HEALTHCHECK_URI_PARAM_KEY, METRICS_ENABLED_PARAM_KEY, METRICS_URI_PARAM_KEY, PING_ENABLED_PARAM_KEY, PING_URI_PARAM_KEY, SERVICE_NAME_PARAM_KEY, THREADS_ENABLED_PARAM_KEY, THREADS_URI_PARAM_KEY
Fields inherited from class jakarta.servlet.http.HttpServlet
LEGACY_DO_HEAD
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
doGet
(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) void
init
(jakarta.servlet.ServletConfig config) protected void
service
(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) Methods inherited from class jakarta.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service
Methods inherited from class jakarta.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
-
Field Details
-
tokenValidator
The access token validator.
-
-
Constructor Details
-
MonitorServlet
public MonitorServlet()
-
-
Method Details
-
init
- Specified by:
init
in interfacejakarta.servlet.Servlet
- Overrides:
init
in classio.dropwizard.metrics.servlets.AdminServlet
- Throws:
jakarta.servlet.ServletException
-
doGet
protected void doGet(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws jakarta.servlet.ServletException, IOException - Overrides:
doGet
in classio.dropwizard.metrics.servlets.AdminServlet
- Throws:
jakarta.servlet.ServletException
IOException
-
service
protected void service(jakarta.servlet.http.HttpServletRequest req, jakarta.servlet.http.HttpServletResponse resp) throws jakarta.servlet.ServletException, IOException - Overrides:
service
in classio.dropwizard.metrics.servlets.AdminServlet
- Throws:
jakarta.servlet.ServletException
IOException
-