Interface SessionHandler

    • Method Detail

      • getDefaultMaxIdleSecs

        int getDefaultMaxIdleSecs()
      • setDefaultMaxIdleSecs

        void setDefaultMaxIdleSecs​(int defaultMaxIdleSecs)
      • complete

        void complete​(Session session)
        Called by the SessionHandler when a session is last accessed by a request.
        Parameters:
        session - the session object
        See Also:
        access(Session)
      • newSession

        Session newSession​(java.lang.String id)
        Creates a new Session.
        Parameters:
        id - the session id
        Returns:
        the new session object
      • getSession

        Session getSession​(java.lang.String id)
        Get a known existing session.
        Parameters:
        id - the session id
        Returns:
        a Session or null if none exists
      • invalidate

        void invalidate​(java.lang.String id)
        Called when a session has expired.
        Parameters:
        id - the id to invalidate
      • newSessionId

        java.lang.String newSessionId​(long seedTerm)
      • addEventListener

        void addEventListener​(java.util.EventListener listener)
        Adds an event listener for session-related events.
        Parameters:
        listener - the session event listener
        See Also:
        removeEventListener(EventListener)
      • removeEventListener

        void removeEventListener​(java.util.EventListener listener)
        Removes an event listener for for session-related events.
        Parameters:
        listener - the session event listener to remove
        See Also:
        addEventListener(EventListener)
      • sessionAttributeChanged

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

        void didActivate​(Session session)
        Call the activation listeners. This must be called holding the lock.
        Parameters:
        session - the session
      • willPassivate

        void willPassivate​(Session session)
        Call the passivation listeners. This must be called holding the lock.
        Parameters:
        session - the session
      • getSessionTimeMax

        long getSessionTimeMax()
        Returns the maximum time the session is valid.
        Returns:
        the maximum amount of time session remained valid
      • getSessionTimeTotal

        long getSessionTimeTotal()
        Returns the total amount of time all sessions remained valid.
        Returns:
        the total amount of time all sessions remained valid
      • getSessionTimeMean

        double getSessionTimeMean()
        Returns the mean amount of time session remained valid.
        Returns:
        the mean amount of time session remained valid
      • getSessionTimeStdDev

        double getSessionTimeStdDev()
        Returns the standard deviation of amount of time session remained valid.
        Returns:
        the standard deviation of amount of time session remained valid
      • getSessionsCreated

        int getSessionsCreated()
        Returns the total number of sessions created by this manager.
        Returns:
        the total number of sessions created by this manager
      • statsReset

        void statsReset()
        Resets the session usage statistics.