Class ClientCallbackHandler

  • All Implemented Interfaces:
    CallbackHandler

    public class ClientCallbackHandler
    extends Object
    implements CallbackHandler
    A CallbackHandler implementation to supply the username and password if required when connecting to the server - if these are not available the user will be prompted to supply them.
    Author:
    Darran Lofthouse
    • Constructor Detail

      • ClientCallbackHandler

        public ClientCallbackHandler()
        Creates a new client call back prompting the user for a username and password.
      • ClientCallbackHandler

        public ClientCallbackHandler​(String username,
                                     String password)
        Creates a new client call back with the given username and password.
        Parameters:
        username - the username to authenticate with, can be null to prompt on the console for a username
        password - the password to authenticate with, can be null to prompt on the console for a password
      • ClientCallbackHandler

        public ClientCallbackHandler​(String username,
                                     char[] password)
        Creates a new client call back with the given username and password.
        Parameters:
        username - the username to authenticate with, can be null to prompt on the console for a username
        password - the password to authenticate with, can be null to prompt on the console for a password