Class JettyStatusProvider

java.lang.Object
com.github.jpmsilva.jsystemd.spring.JettyStatusProvider
All Implemented Interfaces:
StatusProvider, EventListener, ApplicationListener<WebServerInitializedEvent>

public class JettyStatusProvider extends Object implements StatusProvider, ApplicationListener<WebServerInitializedEvent>
Implementation of StatusProvider that provides information regarding the embedded Jetty servers of the application.

For each server, named after the port it listens on, it reports the open connections, out of the maximum the server accepts when limited, and, when the requests are handled by a thread pool rather than by virtual threads, the threads running requests out of the threads in the pool, such as jetty-8080: 12/1000 connections, 3/10 threads. The threads Jetty keeps for itself, to accept connections and wait for their data, are left out of the threads running requests. A server that is not started is left out.

The servers are found as they start, from their WebServerInitializedEvent: the server of the application, as well as the server of the management endpoints when they use a port of their own. Nothing is reported until then.

Author:
Joao Silva
  • Constructor Details

    • JettyStatusProvider

      public JettyStatusProvider()
      Create a new JettyStatusProvider.
  • Method Details