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 on ChoiceCallback which supports the extended callback interface.
Author:
David M. Lloyd
See Also:
  • 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 be null)
      choices - the choices (must not be null)
      defaultChoice - the default choice as an index into the choices array
      multipleSelectionsAllowed - true if multiple selections are allowed
      optional - true if the support for the callback is optional
  • Method Details

    • isOptional

      public boolean isOptional()
      Description copied from interface: ExtendedCallback
      Determine if this callback is optional.
      Specified by:
      isOptional in interface ExtendedCallback
      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 interface ExtendedCallback
      Returns:
      true if the callback is requesting information, false if it is only providing information