Class AbstractSession

    • Method Detail

      • setManager

        public abstract void setManager​(de.uplanet.lucy.server.session.ISessionManager p_manager)
        Associates this session with a session manager.
        Parameters:
        p_manager - The manager to set.
      • reset

        public void reset​(String p_strNewSessionId)
        For internal use only.
      • getId

        public String getId()
        Description copied from interface: ISession
        Get the unique session identifier.
        Specified by:
        getId in interface ISession
      • getSubject

        public Subject getSubject()
        Description copied from interface: ISession
        Get the subject that is associated with this session.
        Specified by:
        getSubject in interface ISession
        Returns:
        The associated subject.
      • setSubject

        public void setSubject​(Subject p_subject)
      • setUser

        public abstract void setUser​(IUser p_user)
      • containsKey

        public boolean containsKey​(String p_strKey)
        Description copied from interface: ISession
        Test if a certain session variable exists.
        Specified by:
        containsKey in interface ISession
        Parameters:
        p_strKey - The name of the session variable.
      • keySet

        public Set<String> keySet()
        Description copied from interface: ISession
        Get a set that contains all session variable names.
        Specified by:
        keySet in interface ISession
        Returns:
        A set wit all session variables.
      • getSessionVars

        public abstract Map<String,​Object> getSessionVars()
        Get a reference to the internal collection of session variables.
        Returns:
        A reference to the internal collection of session variables.
      • get

        public Object get​(String p_strKey)
        Description copied from interface: ISession
        Get a session variable.
        Specified by:
        get in interface ISession
        Parameters:
        p_strKey - The name of the session variable.
        Returns:
        The session variable.
      • get

        public Object get​(String p_strKey,
                          Object p_objFallback)
        Description copied from interface: ISession
        Get a session variable or the specified fallback value.
        Specified by:
        get in interface ISession
        Parameters:
        p_strKey - The name of the session variable.
        p_objFallback - The fallback value that's being used if the session variable does not exist.
        Returns:
        The session variable.
      • put

        public void put​(String p_strKey,
                        Object p_objValue)
        Description copied from interface: ISession
        Set a session variable.
        Specified by:
        put in interface ISession
        Parameters:
        p_strKey - The name of the session variable.
        p_objValue - The value of the session variable.
      • remove

        public void remove​(String p_strKey)
        Description copied from interface: ISession
        Remove a session variable.
        Specified by:
        remove in interface ISession
        Parameters:
        p_strKey - The name of the session variable to be removed.
      • getCreationTime

        public long getCreationTime()
        Description copied from interface: ISession
        Get the time when this session was created.
        Specified by:
        getCreationTime in interface ISession
        Returns:
        The creation time, measured in milliseconds, between the current time and 01-01-1970 00:00:00 UTC.
      • isLoggedOut

        public boolean isLoggedOut()
        Description copied from interface: ISession
        Check if the session is logged out.
        Specified by:
        isLoggedOut in interface ISession
        Returns:
        true is the session is logged out, or false otherwise.
      • isStale

        public boolean isStale()
        Description copied from interface: ISession
        Check if the session has timed out.

        The natural implementation of this method will return isStale(System.currentTimeMillis()).

        Specified by:
        isStale in interface ISession
        Returns:
        true if the session already has timed out, false otherwise.
      • addListener

        public void addListener​(de.uplanet.lucy.server.session.ISessionListener p_listener,
                                boolean p_bWeak)
        Description copied from interface: ISession
        Add a listener for session events.
        Specified by:
        addListener in interface ISession
        Parameters:
        p_listener - The session listener to add.
        p_bWeak - true if the listener should be weakly referenced, false otherwise.