Class ExtendedChoiceCallback
- java.lang.Object
-
- javax.security.auth.callback.ChoiceCallback
-
- org.wildfly.security.auth.callback.ExtendedChoiceCallback
-
- All Implemented Interfaces:
Serializable
,Callback
,ExtendedCallback
public class ExtendedChoiceCallback extends ChoiceCallback implements ExtendedCallback
A variation onChoiceCallback
which supports the extended callback interface.- Author:
- David M. Lloyd
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
optional
private static long
serialVersionUID
-
Constructor Summary
Constructors Constructor Description ExtendedChoiceCallback(String prompt, String[] choices, int defaultChoice, boolean multipleSelectionsAllowed, boolean optional)
Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isOptional()
Determine if this callback is optional.boolean
needsInformation()
Determine if this callback is requesting information.-
Methods inherited from class javax.security.auth.callback.ChoiceCallback
allowMultipleSelections, getChoices, getDefaultChoice, getPrompt, getSelectedIndexes, setSelectedIndex, setSelectedIndexes
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
optional
private final boolean optional
-
-
Constructor Detail
-
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 thechoices
arraymultipleSelectionsAllowed
-true
if multiple selections are allowedoptional
-true
if the support for the callback is optional
-
-
Method Detail
-
isOptional
public boolean isOptional()
Description copied from interface:ExtendedCallback
Determine if this callback is optional.- Specified by:
isOptional
in interfaceExtendedCallback
- Returns:
true
if the callback is optional,false
if it is mandatory
-
needsInformation
public boolean needsInformation()
Description copied from interface:ExtendedCallback
Determine if this callback is requesting information.- Specified by:
needsInformation
in interfaceExtendedCallback
- Returns:
true
if the callback is requesting information,false
if it is only providing information
-
-