Package com.aoindustries.servlet.filter
Class CountConcurrencyListener
- java.lang.Object
-
- com.aoindustries.servlet.filter.CountConcurrencyListener
-
- All Implemented Interfaces:
EventListener
,ServletRequestListener
@WebListener public class CountConcurrencyListener extends Object implements ServletRequestListener
Tracks the request concurrency, used to decide to use concurrent or sequential implementations.
-
-
Field Summary
Fields Modifier and Type Field Description static String
REQUEST_ATTRIBUTE
-
Constructor Summary
Constructors Constructor Description CountConcurrencyListener()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Integer
getConcurrency(ServletRequest request)
Gets the concurrency at the beginning of the request ornull
when listener not active.void
requestDestroyed(ServletRequestEvent event)
void
requestInitialized(ServletRequestEvent event)
-
-
-
Field Detail
-
REQUEST_ATTRIBUTE
public static final String REQUEST_ATTRIBUTE
-
-
Method Detail
-
getConcurrency
public static Integer getConcurrency(ServletRequest request)
Gets the concurrency at the beginning of the request ornull
when listener not active.
-
requestInitialized
public void requestInitialized(ServletRequestEvent event)
- Specified by:
requestInitialized
in interfaceServletRequestListener
-
requestDestroyed
public void requestDestroyed(ServletRequestEvent event)
- Specified by:
requestDestroyed
in interfaceServletRequestListener
-
-