Class HTTPSessionInfo

  • All Implemented Interfaces:
    SilverpeasUserSession

    public class HTTPSessionInfo
    extends SessionInfo
    Information on the HTTP session opened by a Silverpeas user to access the Silverpeas Web pages. It wraps the HttpSession instance created by Silverpeas for a given user and it delegates all the session attribute setting to the wrapped HttpSession instance. So it can be used in a such context as an HTTP session itself. The HTTPSessionInfo objects are mainly used for the users accessing Silverpeas with their WEB browser. It is not yet used in the management of sessions for REST-based web service clients.
    • Method Detail

      • setHttpSession

        public void setHttpSession​(javax.servlet.http.HttpSession httpSession)
      • onClosed

        public void onClosed()
        Description copied from class: SessionInfo
        Frees the allocated resources used in the session management and carried by this session information. This method must be called at session closing by the session management system.
        Overrides:
        onClosed in class SessionInfo
      • setAttribute

        public <T> void setAttribute​(String name,
                                     T value)
        Description copied from class: SessionInfo
        Sets an attribute named by the specified name with the specified value. If no attribute exists with the specified name, then it is added to the session.
        Overrides:
        setAttribute in class SessionInfo
        Type Parameters:
        T - the type of the attribute value.
        Parameters:
        name - the name of the attribute to set.
        value - the value of the attribute to set.
      • unsetAttribute

        public void unsetAttribute​(String name)
        Description copied from class: SessionInfo
        Unsets the specified attribute. The consequence of an unset is the attribute is then removed from the session.
        Overrides:
        unsetAttribute in class SessionInfo
        Parameters:
        name - the name of the attibute to unset.
      • getAttribute

        public <T> T getAttribute​(String name)
        Description copied from class: SessionInfo
        Gets the value of the attribute named by the specified name.
        Overrides:
        getAttribute in class SessionInfo
        Type Parameters:
        T - the type of the attribute value.
        Parameters:
        name - the name of the attribute to get.
        Returns:
        the value of the attribute or null if no such attribute exists.