Class 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 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 class UserIdentifier
        Parameters:
        o - An Object.
        Returns:
        Equals flag.
      • paramString

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