Class ExtendedChoiceCallback
java.lang.Object
javax.security.auth.callback.ChoiceCallback
org.wildfly.security.auth.callback.ExtendedChoiceCallback
- All Implemented Interfaces:
Serializable,Callback,ExtendedCallback
A variation on
ChoiceCallback which supports the extended callback interface.- Author:
- David M. Lloyd
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionExtendedChoiceCallback(String prompt, String[] choices, int defaultChoice, boolean multipleSelectionsAllowed, boolean optional) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermine if this callback is optional.booleanDetermine if this callback is requesting information.Methods inherited from class javax.security.auth.callback.ChoiceCallback
allowMultipleSelections, getChoices, getDefaultChoice, getPrompt, getSelectedIndexes, setSelectedIndex, setSelectedIndexes
-
Constructor Details
-
ExtendedChoiceCallback
public ExtendedChoiceCallback(String prompt, String[] choices, int defaultChoice, boolean multipleSelectionsAllowed, boolean optional) Construct a new instance.- Parameters:
prompt- the text prompt (must not benull)choices- the choices (must not benull)defaultChoice- the default choice as an index into thechoicesarraymultipleSelectionsAllowed-trueif multiple selections are allowedoptional-trueif the support for the callback is optional
-
-
Method Details
-
isOptional
public boolean isOptional()Description copied from interface:ExtendedCallbackDetermine if this callback is optional.- Specified by:
isOptionalin interfaceExtendedCallback- Returns:
trueif the callback is optional,falseif it is mandatory
-
needsInformation
public boolean needsInformation()Description copied from interface:ExtendedCallbackDetermine if this callback is requesting information.- Specified by:
needsInformationin interfaceExtendedCallback- Returns:
trueif the callback is requesting information,falseif it is only providing information
-