Class Credentials


  • public final class Credentials
    extends Object
    A simple class to hold connection credentials and is designed to be immutable.
    • Constructor Detail

      • Credentials

        @ConstructorParameters({"username","password"})
        public Credentials​(String username,
                           String password)
        Construct an immutable Credentials object with the supplied username and password.
        Parameters:
        username - the username
        password - the password
    • Method Detail

      • of

        public static Credentials of​(String username,
                                     String password)
        Construct an immutable Credentials object with the supplied username and password.
        Parameters:
        username - the username
        password - the password
        Returns:
        a new Credentials object
      • getUsername

        public String getUsername()
        Get the username.
        Returns:
        the username
      • getPassword

        public String getPassword()
        Get the password.
        Returns:
        the password