Package com.iizix.user
Class SessionUserIdentifier
- java.lang.Object
- com.iizix.user.UserIdentifier
- com.iizix.user.SessionUserIdentifier
public class SessionUserIdentifier extends UserIdentifier
The User identifier class holds the information about a user or a returning user. The User may, if the application allows it, run several individual session or the same virtual session in parallel. This is configurable, and allows the same user to run different independent sessions by assigning a session ID.- Author:
- Christopher Mindus
Constructor Summary
Constructors Constructor Description SessionUserIdentifier(java.lang.String userID, char[] password, java.lang.String sessionID)
Internal constructor.SessionUserIdentifier(java.lang.String userID, java.lang.String sessionID)
Constructor.
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
Checks if another UserIdentifier equals this one.java.lang.String
getSessionID()
Gets the session ID.protected java.lang.String
paramString()
Formats the value as a string to add toparamString
.Methods inherited from class com.iizix.user.UserIdentifier
createSessionUserIdentifier, getLoginContext, getPassword, getUserID, hashCode, toString, updatePassword
Constructor Detail
SessionUserIdentifier
public SessionUserIdentifier(java.lang.String userID, java.lang.String sessionID)
Constructor.- Parameters:
userID
- User ID, non-empty, not null.sessionID
- The session ID, not null, but can be empty.- Throws:
java.lang.NullPointerException
- If any parameter is null.java.lang.IllegalArgumentException
- If any parameter is empty.
SessionUserIdentifier
public SessionUserIdentifier(java.lang.String userID, char[] password, java.lang.String sessionID)
Internal constructor.- Parameters:
userID
- User ID, non-empty, not null.password
- The password, non-empty, not null.sessionID
- The session ID, not null, but can be empty.
Method Detail
getSessionID
public java.lang.String getSessionID()
Gets the session ID.
equals
public boolean equals(java.lang.Object o)
Checks if another UserIdentifier equals this one. Comparison includes the Session ID.- Overrides:
equals
in classUserIdentifier
- Parameters:
o
- An Object.- Returns:
- Equals flag.
paramString
protected java.lang.String paramString()
Formats the value as a string to add toparamString
.- Overrides:
paramString
in classUserIdentifier