Class DFUserLoginInfo


  • public final class DFUserLoginInfo
    extends java.lang.Object
    Data holder for a single user login info. It is used in IJCUserLoginService. This object is immutable.
    Author:
    Tim Dudgeon
    • Constructor Summary

      Constructors 
      Constructor Description
      DFUserLoginInfo​(java.lang.String username, java.util.Date sessionStartedTime, java.util.Date lastAccessed)
      Creates a new instance of DFUserLoginInfo.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.Date getLastAccessedTime()
      Return time when the user last accessed the session.
      java.util.Date getSessionStartedTime()
      Return time when user logged in.
      java.lang.String getUsername()
      Get Username of the user.
      boolean isConnected()
      Return true if user is currently logged in, otherwise false.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • DFUserLoginInfo

        public DFUserLoginInfo​(java.lang.String username,
                               java.util.Date sessionStartedTime,
                               java.util.Date lastAccessed)
        Creates a new instance of DFUserLoginInfo.
        Parameters:
        username - Username
        sessionStartedTime - When user logged in
        lastAccessed - When user's last activity was recorded (running search, modifying schema, data, etc.)
    • Method Detail

      • getUsername

        public java.lang.String getUsername()
        Get Username of the user. Never returns null.
        Returns:
        Value of property username.
      • isConnected

        public boolean isConnected()
        Return true if user is currently logged in, otherwise false.
        Returns:
        Value of property connected.
      • getSessionStartedTime

        public java.util.Date getSessionStartedTime()
        Return time when user logged in. Can return null when user is not logged in.
        Returns:
        Value of property sessionStartedTime.
      • getLastAccessedTime

        public java.util.Date getLastAccessedTime()
        Return time when the user last accessed the session. Can return null when user is not logged in.
        Returns:
        Value of property lastAccessed.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object