Package com.mckoi.database
Class User
java.lang.Object
com.mckoi.database.User
Encapsulates the information about a single user logged into the system.
The class provides access to information in the user database.
This object also serves as a storage for session state information. For example, this object stores the triggers that this session has created.
NOTE: This object is not immutable. The same user may log into the system and it will result in a new User object being created.
- Author:
- Tobias Downer
-
Method Summary
Modifier and TypeMethodDescriptionReturns the string that describes how this user is connected to the engine.Returns the Database object that this user belongs to.long
Returnst the last time a command was executed by this user.long
Returns the time the user connected.Returns the name of the user.void
logout()
Logs out this user object.final void
Refreshes the last time a command was executed by this user.
-
Method Details
-
getUserName
Returns the name of the user. -
getConnectionString
Returns the string that describes how this user is connected to the engine. This is set by the protocol layer. -
getTimeConnected
public long getTimeConnected()Returns the time the user connected. -
getLastCommandTime
public long getLastCommandTime()Returnst the last time a command was executed by this user. -
getDatabase
Returns the Database object that this user belongs to. -
refreshLastCommandTime
public final void refreshLastCommandTime()Refreshes the last time a command was executed by this user. -
logout
public void logout()Logs out this user object. This will log the user out of the user manager.
-