- java.lang.Object
-
- javax.security.auth.callback.ConfirmationCallback
-
- All Implemented Interfaces:
Serializable
,Callback
public class ConfirmationCallback extends Object implements Callback, Serializable
Underlying security services instantiate and pass a
ConfirmationCallback
to thehandle
method of aCallbackHandler
to ask for YES/NO, OK/CANCEL, YES/NO/CANCEL or other similar confirmations.- Since:
- 1.4
- See Also:
CallbackHandler
, Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static int
CANCEL
CANCEL option.static int
ERROR
ERROR message type.static int
INFORMATION
INFORMATION message type.static int
NO
NO option.static int
OK
OK option.static int
OK_CANCEL_OPTION
OK/CANCEL confirmation confirmation option.static int
UNSPECIFIED_OPTION
Unspecified option type.static int
WARNING
WARNING message type.static int
YES
YES option.static int
YES_NO_CANCEL_OPTION
YES/NO/CANCEL confirmation confirmation option.static int
YES_NO_OPTION
YES/NO confirmation option.
-
Constructor Summary
Constructors Constructor Description ConfirmationCallback(int messageType, int optionType, int defaultOption)
Construct aConfirmationCallback
with a message type, an option type and a default option.ConfirmationCallback(int messageType, String[] options, int defaultOption)
Construct aConfirmationCallback
with a message type, a list of options and a default option.ConfirmationCallback(String prompt, int messageType, int optionType, int defaultOption)
Construct aConfirmationCallback
with a prompt, message type, an option type and a default option.ConfirmationCallback(String prompt, int messageType, String[] options, int defaultOption)
Construct aConfirmationCallback
with a prompt, message type, a list of options and a default option.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getDefaultOption()
Get the default option.int
getMessageType()
Get the message type.String[]
getOptions()
Get the confirmation options.int
getOptionType()
Get the option type.String
getPrompt()
Get the prompt.int
getSelectedIndex()
Get the selected confirmation option.void
setSelectedIndex(int selection)
Set the selected confirmation option.
-