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.
-
-
-
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 benull
to prompt on the console for a usernamepassword
- the password to authenticate with, can benull
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 benull
to prompt on the console for a usernamepassword
- the password to authenticate with, can benull
to prompt on the console for a password
-
-
Method Detail
-
handle
public void handle(Callback[] callbacks) throws UnsupportedCallbackException
- Specified by:
handle
in interfaceCallbackHandler
- Throws:
UnsupportedCallbackException
-
-