javax.security.auth.callback
public class: TextInputCallback [javadoc |
source]
java.lang.Object
javax.security.auth.callback.TextInputCallback
All Implemented Interfaces:
Callback, java$io$Serializable
Direct Known Subclasses:
RealmCallback
Underlying security services instantiate and pass a
TextInputCallback
to the handle
method of a CallbackHandler
to retrieve generic text
information.
Constructor: |
public TextInputCallback(String prompt) {
if (prompt == null || prompt.length() == 0)
throw new IllegalArgumentException();
this.prompt = prompt;
}
Construct a TextInputCallback with a prompt.
Parameters:
prompt - the prompt used to request the information.
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.
|
public TextInputCallback(String prompt,
String defaultText) {
if (prompt == null || prompt.length() == 0 ||
defaultText == null || defaultText.length() == 0)
throw new IllegalArgumentException();
this.prompt = prompt;
this.defaultText = defaultText;
}
Construct a TextInputCallback with a prompt
and default input value.
Parameters:
prompt - the prompt used to request the information.
defaultText - the text to be used as the default text displayed
with the prompt.
Throws:
IllegalArgumentException - if prompt is null,
if prompt has a length of 0,
if defaultText is null
or if defaultText has a length of 0.
- exception:
IllegalArgumentException - if prompt is null,
if prompt has a length of 0,
if defaultText is null
or if defaultText has a length of 0.
|
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |