Package com.im.df.api.support
Class DFUserLoginInfo
- java.lang.Object
-
- com.im.df.api.support.DFUserLoginInfo
-
public final class DFUserLoginInfo extends java.lang.ObjectData holder for a single user login info. It is used inIJCUserLoginService. 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.DategetLastAccessedTime()Return time when the user last accessed the session.java.util.DategetSessionStartedTime()Return time when user logged in.java.lang.StringgetUsername()Get Username of the user.booleanisConnected()Return true if user is currently logged in, otherwise false.java.lang.StringtoString()
-
-
-
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- UsernamesessionStartedTime- When user logged inlastAccessed- 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 returnnullwhen 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 returnnullwhen user is not logged in.- Returns:
- Value of property lastAccessed.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-