Class MonitoringStatisticsProcessor
java.lang.Object
org.glassfish.jersey.server.internal.monitoring.MonitoringStatisticsProcessor
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
.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
Upon calling ofMonitoringStatisticsProcessor.FloodingLogger.conditionallyLogFlooding()
, flooding logger conditionally checks for the size of the associated collection and if its size increases a warning about flooding is logged. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private final int
private static final Logger
private final MonitoringEventListener
private final ScheduledExecutorService
private static final int
private final MonitoringStatisticsImpl.Builder
private final List<MonitoringStatisticsListener>
-
Constructor Summary
ConstructorsConstructorDescriptionMonitoringStatisticsProcessor
(InjectionManager injectionManager, MonitoringEventListener monitoringEventListener) Creates a new instance of processor. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
private void
private void
(package private) void
shutDown()
Stops processing of any further execution of this processor.void
Start the thread that will process the events intoMonitoringStatistics
.
-
Field Details
-
LOGGER
-
DEFAULT_INTERVAL
private static final int DEFAULT_INTERVAL- See Also:
-
SHUTDOWN_TIMEOUT
private static final int SHUTDOWN_TIMEOUT- See Also:
-
monitoringEventListener
-
statisticsBuilder
-
statisticsCallbackList
-
scheduler
-
interval
private final int interval
-
-
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 intoMonitoringStatistics
. -
processExceptionMapperEvents
private void processExceptionMapperEvents() -
processRequestItems
private void processRequestItems() -
processResponseCodeEvents
private void processResponseCodeEvents() -
shutDown
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.
-