java.lang.Object | +--javax.security.auth.callback.TextInputCallback
Underlying security services instantiate and pass aTextInputCallback
to theinvokeCallback
method of aCallbackHandler
to retrieve generic text information.
CallbackHandler
TextInputCallback(java.lang.String prompt) Construct a TextInputCallback with a prompt. | |
TextInputCallback(java.lang.String prompt, java.lang.String defaultText) Construct a TextInputCallback with a prompt and default input value. |
getDefaultText() Get the default text. | |
getPrompt() Get the prompt. | |
getText() Get the retrieved text. | |
setText(java.lang.String text) Set the retrieved text. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
publicTextInputCallback(java.lang.String prompt)
TextInputCallback
with a prompt.prompt
- the prompt used to request the information.java.lang.IllegalArgumentException
- ifprompt
is nullor ifprompt
has a length of 0.publicTextInputCallback(java.lang.String prompt, java.lang.String defaultText)
TextInputCallback
with a prompt and default input value.prompt
- the prompt used to request the information.defaultText
- the text to be used as the default text displayedwith the prompt.java.lang.IllegalArgumentException
- ifprompt
is null,ifprompt
has a length of 0,ifdefaultText
is nullor ifdefaultText
has a length of 0.public java.lang.StringgetPrompt()
public java.lang.StringgetDefaultText()
TextInputCallback
was not instantiated withdefaultText
.public voidsetText(java.lang.String text)
text
- the retrieved text, which may be null.public java.lang.StringgetText()