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 Details

    • SessionUserIdentifier

      public SessionUserIdentifier(String userID, String sessionID)
      Constructor.
      Parameters:
      userID - User ID, non-empty, not null.
      sessionID - The session ID, not null, but can be empty.
      Throws:
      NullPointerException - If any parameter is null.
      IllegalArgumentException - If any parameter is empty.
    • SessionUserIdentifier

      public SessionUserIdentifier(String userID, char[] password, 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 Details

    • getSessionID

      public String getSessionID()
      Gets the session ID.
    • equals

      public boolean equals(Object o)
      Checks if another UserIdentifier equals this one. Comparison includes the Session ID.
      Overrides:
      equals in class UserIdentifier
      Parameters:
      o - An Object.
      Returns:
      Equals flag.
    • paramString

      protected String paramString()
      Formats the value as a string to add to paramString.
      Overrides:
      paramString in class UserIdentifier