Class Credentials


  • @Beta
    public final class Credentials
    extends java.lang.Object
    Credentials can be used when configuring authentication properties used during client handshake.
    Author:
    Ondrej Kosatka (ondrej.kosatka at oracle.com)
    See Also:
    ClientProperties.CREDENTIALS
    • Constructor Summary

      Constructors 
      Constructor Description
      Credentials​(java.lang.String username, byte[] password)
      Create new credentials.
      Credentials​(java.lang.String username, java.lang.String password)
      Create new credentials.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      byte[] getPassword()
      Get the password as byte array.
      java.lang.String getUsername()
      Get the username.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Credentials

        public Credentials​(java.lang.String username,
                           byte[] password)
        Create new credentials.
        Parameters:
        username - Username. Cannot be null.
        password - Password as byte array. Cannot be null.
      • Credentials

        public Credentials​(java.lang.String username,
                           java.lang.String password)
        Create new credentials.
        Parameters:
        username - Username. Cannot be null.
        password - Password. Cannot be null.
    • Method Detail

      • getUsername

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

        public byte[] getPassword()
        Get the password as byte array.
        Returns:
        Password string in byte array representation.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object