ConfirmationCallback
public ConfirmationCallback
(String prompt, int messageType, String[] options, int defaultOption)
Construct a ConfirmationCallback with a prompt, message type, a list of options and a default option. Underlying security services use this constructor if they require a confirmation different from the available preset confirmations provided (for example, CONTINUE/ABORT or STOP/GO). The confirmation options are listed in the options array, and are displayed by the CallbackHandler implementation in a manner consistent with the way preset options are displayed.
- Parameters:
-
prompt - the prompt used to describe the list of options.
-
messageType - the message type (INFORMATION , WARNING or ERROR ).
-
options - the list of confirmation options. The array is cloned to protect against subsequent modification.
-
defaultOption - the default option, represented as an index into the options array.
- Throws:
-
IllegalArgumentException - if prompt is null, if prompt has a length of 0, if messageType is not either INFORMATION , WARNING , or ERROR , if options is null, if options has a length of 0, if any element from options is null, if any element from options has a length of 0, or if defaultOption does not lie within the array boundaries of options .
|
|