Package org.eclipse.ecf.core.security
Class PasswordCallback
java.lang.Object
org.eclipse.ecf.core.security.PasswordCallback
- All Implemented Interfaces:
Serializable
,Callback
Callback that handles passwords
- See Also:
-
Constructor Summary
ConstructorDescriptionPasswordCallback
(String prompt) Construct aPasswordCallback
with a prompt.PasswordCallback
(String prompt, String defaultPassword) Construct aPasswordCallback
with a prompt and default password. -
Method Summary
Modifier and TypeMethodDescriptionGet the default password.Get the retrieved password.Get the prompt.void
setPassword
(String pw) Set the retrieved password.
-
Constructor Details
-
PasswordCallback
Construct aPasswordCallback
with a prompt.- Parameters:
prompt
- the prompt used to request the name.- Throws:
IllegalArgumentException
- ifprompt
is null.
-
PasswordCallback
Construct aPasswordCallback
with a prompt and default password.- Parameters:
prompt
- the prompt used to request the information.defaultPassword
- the name to be used as the default name displayed with the prompt.- Throws:
IllegalArgumentException
- ifprompt
is null.
-
-
Method Details
-
getPrompt
Get the prompt.- Returns:
- the prompt.
-
getDefaultPassword
Get the default password.- Returns:
- the default password, or
null
if thisPasswordCallback
was not instantiated with adefaultPassword
.
-
setPassword
Set the retrieved password.- Parameters:
pw
- the password (which may be null).- See Also:
-
getPassword
Get the retrieved password.- Returns:
- the retrieved password (which may be null)
- See Also:
-