Package com.im.df.api.support
Class DFUserLoginInfo
- java.lang.Object
-
- com.im.df.api.support.DFUserLoginInfo
-
public final class DFUserLoginInfo extends java.lang.Object
Data 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.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()
-
-
-
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 returnnull
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 returnnull
when user is not logged in.- Returns:
- Value of property lastAccessed.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-