Class MonitoringStatisticsProcessor

java.lang.Object
org.glassfish.jersey.server.internal.monitoring.MonitoringStatisticsProcessor

final class MonitoringStatisticsProcessor extends Object
Process events of application and request processing into monitoring statistics. The MonitoringStatisticsProcessor starts a new thread which process events in regular intervals and for each new monitoring statistics it calls registered monitoring statistics event listeners.
  • Field Details

  • Constructor Details

    • MonitoringStatisticsProcessor

      MonitoringStatisticsProcessor(InjectionManager injectionManager, MonitoringEventListener monitoringEventListener)
      Creates a new instance of processor.
      Parameters:
      injectionManager - injection manager.
      monitoringEventListener - Monitoring event listener.
  • Method Details

    • startMonitoringWorker

      public void startMonitoringWorker()
      Start the thread that will process the events into MonitoringStatistics.
    • processExceptionMapperEvents

      private void processExceptionMapperEvents()
    • processRequestItems

      private void processRequestItems()
    • processResponseCodeEvents

      private void processResponseCodeEvents()
    • shutDown

      void shutDown() throws InterruptedException
      Stops processing of any further execution of this processor. The internal thread will finish processing of actual events and will be not executed again. The method finishes after the internal thread finish its processing loop.
      Throws:
      InterruptedException - thrown when waiting for the thread to finish the work is interrupted. In this case internal listeners will be still shutdown.