Class SessionInfo

java.lang.Object
org.nuxeo.ecm.platform.web.common.session.SessionInfo
All Implemented Interfaces:
Comparable<SessionInfo>

public class SessionInfo extends Object implements Comparable<SessionInfo>
Stores informations about a user's Http Session
Since:
5.4.2
Author:
Tiry ([email protected])
  • Field Details

    • sessionId

      protected final String sessionId
    • creationTime

      protected final long creationTime
    • lastAccessTime

      protected long lastAccessTime
    • nbAccess

      protected int nbAccess
    • lastAccessUrl

      protected String lastAccessUrl
    • loginName

      protected String loginName
    • sInvalidator

      protected Runnable sInvalidator
  • Constructor Details

    • SessionInfo

      public SessionInfo(String sid, Runnable sInvalidator)
      Parameters:
      sid - the session id
      sInvalidator - a runnable to invalidate the session
      Since:
      2023.3
    • SessionInfo

      public SessionInfo(String sid)
  • Method Details

    • getLastAccessTime

      public long getLastAccessTime()
    • updateLastAccessTime

      public void updateLastAccessTime()
    • getLastAccessUrl

      public String getLastAccessUrl()
    • setLastAccessUrl

      public void setLastAccessUrl(String lastAccessUrl)
    • getCreationTime

      public long getCreationTime()
    • getLoginName

      public String getLoginName()
    • setLoginName

      public void setLoginName(String loginName)
    • getSessionId

      public String getSessionId()
    • getDurationInS

      public long getDurationInS()
    • getInactivityInS

      public long getInactivityInS()
    • formatDuration

      protected String formatDuration(long nbs)
    • getDurationAsString

      public String getDurationAsString()
    • getInactivityAsString

      public String getInactivityAsString()
    • getLastAccessDate

      public Date getLastAccessDate()
    • compareTo

      public int compareTo(SessionInfo o)
      Specified by:
      compareTo in interface Comparable<SessionInfo>
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getAccessedPagesCount

      public int getAccessedPagesCount()