Interface SessionHolder

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    ThreadLocalSessionHolder

    public interface SessionHolder
    extends java.io.Serializable
    Holder for a session.
    Author:
    harald
    • Method Detail

      • getSession

        Session getSession()
        Gets the session.
        The threadlocal session is returned if the session is null.
        Returns:
        the session.
      • setSession

        void setSession​(Session session)
        Sets the session.
        Parameters:
        session - the session, null if threadlocal
      • isSessionThreadLocal

        boolean isSessionThreadLocal()
        Returns whether the session is thread local.
        Returns:
        true if threadlocal
      • setSessionImmutable

        void setSessionImmutable​(boolean sessionImmutable)
        Sets the session to immutable.
        Parameters:
        sessionImmutable - true if session cannot be changed anymore
      • isSessionImmutable

        boolean isSessionImmutable()
        Returns whether the session is immutable.
        Returns:
        true if immutable
      • getSessionInfo

        SessionInfo getSessionInfo()
        The SessionInfo extends the UserInfo by a SecurityManager.
        Returns:
        the SessionInfo associated to the Db.
      • getSessionInstanceNumber

        int getSessionInstanceNumber()
        Gets the unique instance number of the Session.

        Delegating getSession().getInstanceNumber() to getSessionInstanceNumber allows to override getSession and dynamically retrieve the thread's session without changing the sorting order.

        Returns:
        the session's instance number