Home » openjdk-7 » javax.security » auth » callback » [javadoc | source]
javax.security.auth.callback
public class: PasswordCallback [javadoc | source]
java.lang.Object
   javax.security.auth.callback.PasswordCallback

All Implemented Interfaces:
    Callback, java$io$Serializable

Underlying security services instantiate and pass a PasswordCallback to the handle method of a CallbackHandler to retrieve password information.

Constructor:
 public PasswordCallback(String prompt,
    boolean echoOn) 
    Construct a PasswordCallback with a prompt and a boolean specifying whether the password should be displayed as it is being typed.

    Parameters:
    prompt - the prompt used to request the password.


    echoOn - true if the password should be displayed as it is being typed.
    Throws:
    IllegalArgumentException - if prompt is null or if prompt has a length of 0.
    exception: IllegalArgumentException - if prompt is null or if prompt has a length of 0.
Method from javax.security.auth.callback.PasswordCallback Summary:
clearPassword,   getPassword,   getPrompt,   isEchoOn,   setPassword
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.security.auth.callback.PasswordCallback Detail:
 public  void clearPassword() 
    Clear the retrieved password.
 public char[] getPassword() 
    Get the retrieved password.

    This method returns a copy of the retrieved password.

 public String getPrompt() 
    Get the prompt.

 public boolean isEchoOn() 
    Return whether the password should be displayed as it is being typed.

 public  void setPassword(char[] password) 
    Set the retrieved password.

    This method makes a copy of the input password before storing it.