public class SessionCountListener extends Object implements javax.servlet.http.HttpSessionListener
Modifier and Type | Field and Description |
---|---|
private static boolean |
_active |
private static AtomicInteger |
_count |
private static Logger |
_logger |
Constructor and Description |
---|
SessionCountListener()
Active the static listener
|
Modifier and Type | Method and Description |
---|---|
static int |
getSessionCount()
Returns the number of active Sessions
|
void |
sessionCreated(javax.servlet.http.HttpSessionEvent se) |
void |
sessionDestroyed(javax.servlet.http.HttpSessionEvent se) |
private static AtomicInteger _count
private static boolean _active
public SessionCountListener()
public void sessionCreated(javax.servlet.http.HttpSessionEvent se)
sessionCreated
in interface javax.servlet.http.HttpSessionListener
public void sessionDestroyed(javax.servlet.http.HttpSessionEvent se)
sessionDestroyed
in interface javax.servlet.http.HttpSessionListener
public static int getSessionCount()
IllegalStateException
- if the listener is not registered