NameCallbackpublic class NameCallback extends Object implements Callback, Serializable Underlying security services instantiate and pass a
NameCallback to the handle
method of a CallbackHandler to retrieve name information. |
Fields Summary |
---|
private static final long | serialVersionUID | private String | prompt | private String | defaultName | private String | inputName |
Constructors Summary |
---|
public NameCallback(String prompt)Construct a NameCallback with a prompt.
if (prompt == null || prompt.length() == 0)
throw new IllegalArgumentException();
this.prompt = prompt;
| public NameCallback(String prompt, String defaultName)Construct a NameCallback with a prompt
and default name.
if (prompt == null || prompt.length() == 0 ||
defaultName == null || defaultName.length() == 0)
throw new IllegalArgumentException();
this.prompt = prompt;
this.defaultName = defaultName;
|
Methods Summary |
---|
public java.lang.String | getDefaultName()Get the default name.
return defaultName;
| public java.lang.String | getName()Get the retrieved name.
return inputName;
| public java.lang.String | getPrompt()Get the prompt.
return prompt;
| public void | setName(java.lang.String name)Set the retrieved name.
this.inputName = name;
|
|