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

public class MonitorServlet extends io.dropwizard.metrics.servlets.AdminServlet
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

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    The monitor servlet access token configuration.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    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

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected 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

    Methods inherited from class java.lang.Object

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

  • Constructor Details

  • Method Details

    • init

      public void init(jakarta.servlet.ServletConfig config) throws jakarta.servlet.ServletException
      Specified by:
      init in interface jakarta.servlet.Servlet
      Overrides:
      init in class io.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 class io.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 class io.dropwizard.metrics.servlets.AdminServlet
      Throws:
      jakarta.servlet.ServletException
      IOException