Package com.helger.xservlet.requesttrack
Class RequestTracker
- java.lang.Object
-
- com.helger.scope.singleton.AbstractSingleton
-
- com.helger.web.scope.singleton.AbstractGlobalWebSingleton
-
- com.helger.xservlet.requesttrack.RequestTracker
-
- All Implemented Interfaces:
com.helger.scope.IScopeDestructionAware,com.helger.web.scope.singleton.IWebSingleton
@Immutable public final class RequestTracker extends com.helger.web.scope.singleton.AbstractGlobalWebSingletonThis is the entry point for request time monitoring. It keeps a centralRequestTrackingManagerand runs a daemonThreadfor monitoring all open requests.- Since:
- 9.0.0
- Author:
- Philip Helger
-
-
Constructor Summary
Constructors Constructor Description RequestTracker()Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidaddRequest(String sRequestID, com.helger.web.scope.IRequestWebScope aRequestScope)Add new request to the trackingScheduledExecutorServicegetExecutorService()static RequestTrackergetInstance()RequestTrackingManagergetRequestTrackingMgr()static com.helger.commons.callback.CallbackList<ILongRunningRequestCallback>longRunningRequestCallbacks()protected voidonDestroy(com.helger.scope.IScope aScopeInDestruction)static com.helger.commons.callback.CallbackList<IParallelRunningRequestCallback>parallelRunningRequestCallbacks()static voidremoveRequest(String sRequestID)Remove a request from the tracking.-
Methods inherited from class com.helger.web.scope.singleton.AbstractGlobalWebSingleton
getAllGlobalSingletons, getGlobalSingleton, getGlobalSingletonIfInstantiated, isGlobalSingletonInstantiated
-
Methods inherited from class com.helger.scope.singleton.AbstractSingleton
getAllSingletons, getSingleton, getSingletonIfInstantiated, getSingletonScopeKey, isDestroyed, isInDestruction, isInInstantiation, isInPreDestruction, isInstantiated, isSingletonInstantiated, isUsableObject, onAfterInstantiation, onBeforeDestroy, onBeforeScopeDestruction, onScopeDestruction, readAbstractSingletonFields, setDestroyed, setInDestruction, setInInstantiation, setInPreDestruction, setInstantiated, toString, writeAbstractSingletonFields
-
-
-
-
Constructor Detail
-
RequestTracker
@Deprecated @UsedViaReflection public RequestTracker()
Deprecated.
-
-
Method Detail
-
longRunningRequestCallbacks
@Nonnull @ReturnsMutableObject public static com.helger.commons.callback.CallbackList<ILongRunningRequestCallback> longRunningRequestCallbacks()
-
parallelRunningRequestCallbacks
@Nonnull @ReturnsMutableObject public static com.helger.commons.callback.CallbackList<IParallelRunningRequestCallback> parallelRunningRequestCallbacks()
-
onDestroy
protected void onDestroy(@Nonnull com.helger.scope.IScope aScopeInDestruction)
- Overrides:
onDestroyin classcom.helger.scope.singleton.AbstractSingleton
-
getInstance
@Nonnull public static RequestTracker getInstance()
-
getRequestTrackingMgr
@Nonnull public RequestTrackingManager getRequestTrackingMgr()
- Returns:
- The underlying request tracking manager. Never
null. Don't use except you know what you are doing!
-
getExecutorService
@Nonnull public ScheduledExecutorService getExecutorService()
- Returns:
- The executor service used to schedule the background tasks
-
addRequest
public static void addRequest(@Nonnull @Nonempty String sRequestID, @Nonnull com.helger.web.scope.IRequestWebScope aRequestScope)
Add new request to the tracking- Parameters:
sRequestID- The unique request ID.aRequestScope- The request scope itself.
-
-