Package org.wildfly.plugin.tools.client

## Class ClientCallbackHandler

- java.lang.Object
- - org.wildfly.plugin.tools.client.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 Summary

    Constructors
    Constructor | Description
    --- | ---
    `ClientCallbackHandler()` | Creates a new client call back prompting the user for a username and password.
    `ClientCallbackHandler​(String username, char[] password)` | Creates a new client call back with the given username and password.
    `ClientCallbackHandler​(String username, String password)` | Creates a new client call back with the given username and password.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `handle​(Callback[] callbacks)` |

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### 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

  - ### Method Detail

    - #### handle

          public void handle​(Callback[] callbacks)
                      throws UnsupportedCallbackException

      Specified by:
        `handle` in interface `CallbackHandler`
      Throws:
        `UnsupportedCallbackException`