Package org.bedework.util.servlet
Class SessionListener
- java.lang.Object
-
- org.bedework.util.servlet.SessionListener
-
- All Implemented Interfaces:
EventListener,javax.servlet.http.HttpSessionListener,org.bedework.util.logging.Logged
public class SessionListener extends Object implements javax.servlet.http.HttpSessionListener, org.bedework.util.logging.Logged
A class to listen for session start and end. Note this may not work too well in a clustered environment because the counts should be shared.
-
-
Constructor Summary
Constructors Constructor Description SessionListener()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bedework.util.logging.BwLoggergetLogger()protected voidlogSessionCounts(javax.servlet.http.HttpSession sess, boolean start)Log the session counters for applications that maintain them.voidsessionCreated(javax.servlet.http.HttpSessionEvent se)voidsessionDestroyed(javax.servlet.http.HttpSessionEvent se)static voidsetLogActive(boolean val)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.bedework.util.logging.Logged
audit, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, setLogLevel, trace, trace, warn
-
-
-
-
Method Detail
-
sessionCreated
public void sessionCreated(javax.servlet.http.HttpSessionEvent se)
- Specified by:
sessionCreatedin interfacejavax.servlet.http.HttpSessionListener
-
sessionDestroyed
public void sessionDestroyed(javax.servlet.http.HttpSessionEvent se)
- Specified by:
sessionDestroyedin interfacejavax.servlet.http.HttpSessionListener
-
setLogActive
public static void setLogActive(boolean val)
- Parameters:
val-
-
logSessionCounts
protected void logSessionCounts(javax.servlet.http.HttpSession sess, boolean start)Log the session counters for applications that maintain them.- Parameters:
sess- HttpSession for the session idstart- true for session start
-
getLogger
public org.bedework.util.logging.BwLogger getLogger()
- Specified by:
getLoggerin interfaceorg.bedework.util.logging.Logged
-
-