Package 

Class Session

  • All Implemented Interfaces:

    
    public final class Session
    
                        

    Provides session information.

    • Method Detail

      • getLastAccessedTime

         final Long getLastAccessedTime()

        The last time the client sent a request associated with this session.

      • getId

         final String getId()

        A string containing the unique identifier assigned to this session (Cookie).

      • get

         final Object get(String name)

        Returns the attribute object bound to this session by the given name.

        Parameters:
        name - String specifying the name of the object.
      • set

         final Unit set(String name, Object value)

        Sets a attribute object to this session with the given name.

        Parameters:
        name - String specifying the name of the object.
        value - The object to be bound.
      • remove

         final Unit remove(String name)

        Removes the bound object from the session attribute with the specified name.

        Parameters:
        name - String specifying the name of the object.
      • removeAttribute

         final Unit removeAttribute(String name)

        Removes the bound object from the session attribute with the specified name.

        Parameters:
        name - String specifying the name of the object.
      • isNew

         final Boolean isNew()

        Returns <code>true</code> if the client does not yet know about the session or if the client chooses not to join the session.

      • invalidate

         final Unit invalidate()

        Invalidates this session then unbinds any objects bound to it.