Class 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.BwLogger getLogger()  
      protected void logSessionCounts​(javax.servlet.http.HttpSession sess, boolean start)
      Log the session counters for applications that maintain them.
      void sessionCreated​(javax.servlet.http.HttpSessionEvent se)  
      void sessionDestroyed​(javax.servlet.http.HttpSessionEvent se)  
      static void setLogActive​(boolean val)  
      • 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
    • Constructor Detail

      • SessionListener

        public SessionListener()
    • Method Detail

      • sessionCreated

        public void sessionCreated​(javax.servlet.http.HttpSessionEvent se)
        Specified by:
        sessionCreated in interface javax.servlet.http.HttpSessionListener
      • sessionDestroyed

        public void sessionDestroyed​(javax.servlet.http.HttpSessionEvent se)
        Specified by:
        sessionDestroyed in interface javax.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 id
        start - true for session start
      • getLogger

        public org.bedework.util.logging.BwLogger getLogger()
        Specified by:
        getLogger in interface org.bedework.util.logging.Logged