Class AbstractSessionHandler

    • Constructor Detail

      • AbstractSessionHandler

        public AbstractSessionHandler()
    • Method Detail

      • setSessionIdGenerator

        protected void setSessionIdGenerator​(SessionIdGenerator sessionIdGenerator)
      • setSessionCache

        protected void setSessionCache​(SessionCache sessionCache)
      • newSession

        public Session newSession​(java.lang.String id)
        Create an entirely new Session.
        Specified by:
        newSession in interface SessionHandler
        Parameters:
        id - identity of session to create
        Returns:
        the new session object
      • getSession

        public Session getSession​(java.lang.String id)
        Description copied from interface: SessionHandler
        Get a known existing session.
        Specified by:
        getSession in interface SessionHandler
        Parameters:
        id - the session id
        Returns:
        a Session or null if none exists
      • invalidate

        public void invalidate​(java.lang.String id)
        Description copied from interface: SessionHandler
        Called when a session has expired.
        Specified by:
        invalidate in interface SessionHandler
        Parameters:
        id - the id to invalidate
      • sessionAttributeChanged

        public void sessionAttributeChanged​(Session session,
                                            java.lang.String name,
                                            java.lang.Object oldValue,
                                            java.lang.Object newValue)
        Description copied from interface: SessionHandler
        Call binding and attribute listeners based on the new and old values of the attribute.
        Specified by:
        sessionAttributeChanged in interface SessionHandler
        Parameters:
        session - the basic session
        name - name of the attribute
        oldValue - previous value of the attribute
        newValue - new value of the attribute
      • didActivate

        public void didActivate​(Session session)
        Description copied from interface: SessionHandler
        Call the activation listeners. This must be called holding the lock.
        Specified by:
        didActivate in interface SessionHandler
        Parameters:
        session - the session
      • willPassivate

        public void willPassivate​(Session session)
        Description copied from interface: SessionHandler
        Call the passivation listeners. This must be called holding the lock.
        Specified by:
        willPassivate in interface SessionHandler
        Parameters:
        session - the session
      • getSessionTimeMax

        public long getSessionTimeMax()
        Description copied from interface: SessionHandler
        Returns the maximum time the session is valid.
        Specified by:
        getSessionTimeMax in interface SessionHandler
        Returns:
        the maximum amount of time session remained valid
      • getSessionTimeTotal

        public long getSessionTimeTotal()
        Description copied from interface: SessionHandler
        Returns the total amount of time all sessions remained valid.
        Specified by:
        getSessionTimeTotal in interface SessionHandler
        Returns:
        the total amount of time all sessions remained valid
      • getSessionTimeMean

        public double getSessionTimeMean()
        Description copied from interface: SessionHandler
        Returns the mean amount of time session remained valid.
        Specified by:
        getSessionTimeMean in interface SessionHandler
        Returns:
        the mean amount of time session remained valid
      • getSessionTimeStdDev

        public double getSessionTimeStdDev()
        Description copied from interface: SessionHandler
        Returns the standard deviation of amount of time session remained valid.
        Specified by:
        getSessionTimeStdDev in interface SessionHandler
        Returns:
        the standard deviation of amount of time session remained valid
      • getSessionsCreated

        public int getSessionsCreated()
        Description copied from interface: SessionHandler
        Returns the total number of sessions created by this manager.
        Specified by:
        getSessionsCreated in interface SessionHandler
        Returns:
        the total number of sessions created by this manager
      • statsReset

        public void statsReset()
        Resets the session usage statistics.
        Specified by:
        statsReset in interface SessionHandler
      • doInitialize

        protected void doInitialize()
                             throws java.lang.Exception
        Specified by:
        doInitialize in class AbstractComponent
        Throws:
        java.lang.Exception
      • doDestroy

        protected void doDestroy()
                          throws java.lang.Exception
        Specified by:
        doDestroy in class AbstractComponent
        Throws:
        java.lang.Exception