Class TomcatStatusProvider

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

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

For each connector, it reports the open connections out of the maximum the connector accepts, and, when the requests are handled by a thread pool rather than by virtual threads, the busy threads out of the threads in the pool, such as http-nio-8080: 8/8192 connections, 3/10 threads. A connector that accepts unlimited connections only reports its threads, and one 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

    • TomcatStatusProvider

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