Class RequestCountListener
java.lang.Object
org.ametys.runtime.plugins.admin.jvmstatus.RequestCountListener
- All Implemented Interfaces:
EventListener
,ServletRequestListener
This component count the current active requests and count all
request since startup.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
Returns the current number of active requests.static int
Returns the total number of requests since startup.void
void
-
Constructor Details
-
RequestCountListener
public RequestCountListener()Activate the counter
-
-
Method Details
-
requestInitialized
- Specified by:
requestInitialized
in interfaceServletRequestListener
-
requestDestroyed
- Specified by:
requestDestroyed
in interfaceServletRequestListener
-
getCurrentRequestCount
Returns the current number of active requests.- Returns:
- the current number of active requests.
- Throws:
IllegalStateException
- if the listener is not registered.
-
getTotalRequestCount
Returns the total number of requests since startup.- Returns:
- the total number of active since startup.
- Throws:
IllegalStateException
- if the listener is not registered.
-