| java.lang.Object javax.security.auth.callback.ConfirmationCallback
Field Summary | |
final public static int | CANCEL CANCEL option. | final public static int | ERROR ERROR message type. | final public static int | INFORMATION INFORMATION message type. | final public static int | NO NO option. | final public static int | OK OK option. | final public static int | OK_CANCEL_OPTION OK/CANCEL confirmation confirmation option. | final public static int | UNSPECIFIED_OPTION Unspecified option type. | final public static int | WARNING WARNING message type. | final public static int | YES YES option. | final public static int | YES_NO_CANCEL_OPTION YES/NO/CANCEL confirmation confirmation option. | final public static int | YES_NO_OPTION YES/NO confirmation option. |
Constructor Summary | |
public | ConfirmationCallback(int messageType, int optionType, int defaultOption) Construct a ConfirmationCallback with a
message type, an option type and a default option.
Underlying security services use this constructor if
they require either a YES/NO, YES/NO/CANCEL or OK/CANCEL
confirmation.
Parameters: messageType - the message type (INFORMATION ,WARNING or ERROR ). | public | ConfirmationCallback(int messageType, String[] options, int defaultOption) Construct a ConfirmationCallback with a
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: messageType - the message type (INFORMATION ,WARNING or ERROR ). | public | ConfirmationCallback(String prompt, int messageType, int optionType, int defaultOption) Construct a ConfirmationCallback with a prompt,
message type, an option type and a default option.
Underlying security services use this constructor if
they require either a YES/NO, YES/NO/CANCEL or OK/CANCEL
confirmation.
Parameters: prompt - the prompt used to describe the list of options. | 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. |
CANCEL | final public static int CANCEL(Code) | | CANCEL option.
If an optionType was specified to this
ConfirmationCallback , this option may be specified as a
defaultOption or returned as the selected index.
|
ERROR | final public static int ERROR(Code) | | ERROR message type.
|
INFORMATION | final public static int INFORMATION(Code) | | INFORMATION message type.
|
NO | final public static int NO(Code) | | NO option.
If an optionType was specified to this
ConfirmationCallback , this option may be specified as a
defaultOption or returned as the selected index.
|
OK | final public static int OK(Code) | | OK option.
If an optionType was specified to this
ConfirmationCallback , this option may be specified as a
defaultOption or returned as the selected index.
|
OK_CANCEL_OPTION | final public static int OK_CANCEL_OPTION(Code) | | OK/CANCEL confirmation confirmation option.
An underlying security service specifies this as the
optionType to a ConfirmationCallback
constructor if it requires a confirmation which can be answered
with either OK or CANCEL .
|
UNSPECIFIED_OPTION | final public static int UNSPECIFIED_OPTION(Code) | | Unspecified option type.
The getOptionType method returns this
value if this ConfirmationCallback was instantiated
with options instead of an optionType .
|
WARNING | final public static int WARNING(Code) | | WARNING message type.
|
YES | final public static int YES(Code) | | YES option.
If an optionType was specified to this
ConfirmationCallback , this option may be specified as a
defaultOption or returned as the selected index.
|
YES_NO_CANCEL_OPTION | final public static int YES_NO_CANCEL_OPTION(Code) | | YES/NO/CANCEL confirmation confirmation option.
An underlying security service specifies this as the
optionType to a ConfirmationCallback
constructor if it requires a confirmation which can be answered
with either YES , NO or CANCEL .
|
YES_NO_OPTION | final public static int YES_NO_OPTION(Code) | | YES/NO confirmation option.
An underlying security service specifies this as the
optionType to a ConfirmationCallback
constructor if it requires a confirmation which can be answered
with either YES or NO .
|
ConfirmationCallback | public ConfirmationCallback(int messageType, int optionType, int defaultOption)(Code) | | Construct a ConfirmationCallback with a
message type, an option type and a default option.
Underlying security services use this constructor if
they require either a YES/NO, YES/NO/CANCEL or OK/CANCEL
confirmation.
Parameters: messageType - the message type (INFORMATION ,WARNING or ERROR ). Parameters: optionType - the option type (YES_NO_OPTION ,YES_NO_CANCEL_OPTION orOK_CANCEL_OPTION ).
Parameters: defaultOption - the default optionfrom the provided optionType (YES ,NO , CANCEL orOK ). exception: IllegalArgumentException - if messageType is not eitherINFORMATION , WARNING ,or ERROR , if optionType is not eitherYES_NO_OPTION ,YES_NO_CANCEL_OPTION , orOK_CANCEL_OPTION ,or if defaultOption does not correspond to one of the options inoptionType .
|
ConfirmationCallback | public ConfirmationCallback(int messageType, String[] options, int defaultOption)(Code) | | Construct a ConfirmationCallback with a
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: messageType - the message type (INFORMATION ,WARNING or ERROR ). Parameters: options - the list of confirmation options.
Parameters: defaultOption - the default option, represented as an indexinto the options array. exception: IllegalArgumentException - if messageType is not eitherINFORMATION , 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 ofoptions .
|
ConfirmationCallback | public ConfirmationCallback(String prompt, int messageType, int optionType, int defaultOption)(Code) | | Construct a ConfirmationCallback with a prompt,
message type, an option type and a default option.
Underlying security services use this constructor if
they require either a YES/NO, YES/NO/CANCEL or OK/CANCEL
confirmation.
Parameters: prompt - the prompt used to describe the list of options. Parameters: messageType - the message type (INFORMATION ,WARNING or ERROR ).
Parameters: optionType - the option type (YES_NO_OPTION ,YES_NO_CANCEL_OPTION orOK_CANCEL_OPTION ).
Parameters: defaultOption - the default optionfrom the provided optionType (YES ,NO , CANCEL orOK ). exception: IllegalArgumentException - if prompt is null,if prompt has a length of 0,if messageType is not eitherINFORMATION , WARNING ,or ERROR , if optionType is not eitherYES_NO_OPTION ,YES_NO_CANCEL_OPTION , orOK_CANCEL_OPTION ,or if defaultOption does not correspond to one of the options inoptionType .
|
ConfirmationCallback | public ConfirmationCallback(String prompt, int messageType, String[] options, int defaultOption)(Code) | | 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. Parameters: messageType - the message type (INFORMATION ,WARNING or ERROR ).
Parameters: options - the list of confirmation options.
Parameters: defaultOption - the default option, represented as an indexinto the options array. exception: IllegalArgumentException - if prompt is null,if prompt has a length of 0,if messageType is not eitherINFORMATION , 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 ofoptions .
|
getDefaultOption | public int getDefaultOption()(Code) | | Get the default option.
the default option, represented asYES , NO , OK orCANCEL if an optionType was specified to the constructor of thisConfirmationCallback .Otherwise, this method returns the default option asan index into theoptions array specified to the constructorof this ConfirmationCallback . |
getMessageType | public int getMessageType()(Code) | | Get the message type.
the message type (INFORMATION ,WARNING or ERROR ). |
getOptionType | public int getOptionType()(Code) | | Get the option type.
If this method returns UNSPECIFIED_OPTION , then this
ConfirmationCallback was instantiated with
options instead of an optionType .
In this case, invoke the getOptions method
to determine which confirmation options to display.
the option type (YES_NO_OPTION ,YES_NO_CANCEL_OPTION orOK_CANCEL_OPTION ), orUNSPECIFIED_OPTION if thisConfirmationCallback was instantiated withoptions instead of an optionType . |
getOptions | public String[] getOptions()(Code) | | Get the confirmation options.
the list of confirmation options, or null if thisConfirmationCallback was instantiated withan optionType instead of options . |
getPrompt | public String getPrompt()(Code) | | Get the prompt.
the prompt, or null if this ConfirmationCallback was instantiated without a prompt . |
getSelectedIndex | public int getSelectedIndex()(Code) | | Get the selected confirmation option.
the selected confirmation option represented asYES , NO , OK orCANCEL if an optionType was specified to the constructor of thisConfirmationCallback .Otherwise, this method returns the selected confirmationoption as an index into theoptions array specified to the constructorof this ConfirmationCallback . See Also: ConfirmationCallback.setSelectedIndex |
setSelectedIndex | public void setSelectedIndex(int selection)(Code) | | Set the selected confirmation option.
Parameters: selection - the selection represented as YES ,NO , OK or CANCEL if an optionType was specified to the constructorof this ConfirmationCallback .Otherwise, the selection represents the index into theoptions array specified to the constructorof this ConfirmationCallback . See Also: ConfirmationCallback.getSelectedIndex |
|
|