Interface Session

All Known Implementing Classes:
DefaultSession

public interface Session
The Interface Session.

Created: 2017. 6. 13.

  • Method Details

    • getId

      String getId()
    • getAttribute

      <T> T getAttribute(String name)
    • setAttribute

      Object setAttribute(String name, Object value)
    • getAttributeNames

      Set<String> getAttributeNames()
    • removeAttribute

      Object removeAttribute(String name)
    • getCreationTime

      long getCreationTime()
    • getLastAccessedTime

      long getLastAccessedTime()
    • getMaxInactiveInterval

      int getMaxInactiveInterval()
    • setMaxInactiveInterval

      void setMaxInactiveInterval(int secs)
    • invalidate

      void invalidate()
      Called by users to invalidate a session, or called by the access method as a request enters the session if the session has expired, or called by manager as a result of scavenger expiring session.
    • getDestroyedReason

      Session.DestroyedReason getDestroyedReason()
      Returns the reason why the session was destroyed.
      Returns:
      the destroyed reason
    • isValid

      boolean isValid()
      Returns whether it is a valid session or not.
      Returns:
      true if valid session, false otherwise
    • isNew

      boolean isNew()
      Returns true if a new session was created for the request.
      Returns:
      true if the server has created a session, but the client has not yet joined
    • access

      boolean access()
      Called when a session is first accessed by a request.
    • complete

      void complete()
      Called when a session is last accessed by a request.