所有类


javax.security.auth.callback
类 ConfirmationCallback

java.lang.Object
  继承者 javax.security.auth.callback.ConfirmationCallback
所有已实现的接口:
Serializable, Callback

public class ConfirmationCallback
   
   
   
   
   
extends Object
implements Callback, Serializable

基础安全服务实例化 ConfirmationCallback,并将其传递到 CallbackHandlerhandle 方法,以请求 YES/NO、OK/CANCEL、YES/NO/CANCEL 或其他类似的确认信息。

另请参见:
CallbackHandler, 序列化表格

字段摘要
static intCANCEL
          CANCEL 选项。
static intERROR
          ERROR 消息类型。
static intINFORMATION
          INFORMATION 消息类型。
static intNO
          NO 选项。
static intOK
          OK 选项。
static intOK_CANCEL_OPTION
          OK/CANCEL 确认选项。
static intUNSPECIFIED_OPTION
          未指定的选项类型。
static intWARNING
          WARNING 消息类型。
static intYES
          YES 选项。
static intYES_NO_CANCEL_OPTION
          YES/NO/CANCEL 确认选项。
static intYES_NO_OPTION
          YES/NO 确认选项。
 
构造方法摘要
ConfirmationCallback(int messageType, int optionType, int defaultOption)
          构造一个带有消息类型、选项类型和默认选项的 ConfirmationCallback
ConfirmationCallback(int messageType, String[] options, int defaultOption)
          构造一个带有消息类型、选项列表和默认选项的 ConfirmationCallback
ConfirmationCallback(String prompt, int messageType, int optionType, int defaultOption)
          构造一个带有提示、消息类型、选项类型和默认选项的 ConfirmationCallback
ConfirmationCallback(String prompt, int messageType, String[] options, int defaultOption)
          构造一个带有提示、消息类型、选项列表和默认选项的 ConfirmationCallback
 
方法摘要
 intgetDefaultOption()
          获取默认选项。
 intgetMessageType()
          获取消息类型。
 String[]getOptions()
          获取确认选项。
 intgetOptionType()
          获取选项类型。
 StringgetPrompt()
          获取提示。
 intgetSelectedIndex()
          获取选中的确认选项。
 voidsetSelectedIndex(int selection)
          设置选中的确认选项。
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

字段详细信息

UNSPECIFIED_OPTION

public static final int UNSPECIFIED_OPTION
未指定的选项类型。

如果此 ConfirmationCallback 是使用 options 而不是 optionType 实例化的,则 getOptionType 方法返回此值。

另请参见:
常量字段值

YES_NO_OPTION

public static final int YES_NO_OPTION
YES/NO 确认选项。

如果 ConfirmationCallback 需要一个以 YESNO 作答的确认信息,则基础安全服务将此值指定为 ConfirmationCallback 构造方法的 optionType

另请参见:
常量字段值

YES_NO_CANCEL_OPTION

public static final int YES_NO_CANCEL_OPTION
YES/NO/CANCEL 确认选项。

如果 ConfirmationCallback 需要一个以 YESNOCANCEL 作答的确认信息,则基础安全服务将此值指定为 ConfirmationCallback 构造方法的 optionType

另请参见:
常量字段值

OK_CANCEL_OPTION

public static final int OK_CANCEL_OPTION
OK/CANCEL 确认选项。

如果 ConfirmationCallback 需要一个以 OKCANCEL 作答的确认信息,则基础安全服务将此值指定为 ConfirmationCallback 构造方法的 optionType

另请参见:
常量字段值

YES

public static final int YES
YES 选项。

如果指定了此 ConfirmationCallbackoptionType,则可以将此选项指定为 defaultOption 或作为选择的索引返回。

另请参见:
常量字段值

NO

public static final int NO
NO 选项。

如果指定了此 ConfirmationCallbackoptionType,则可以将此选项指定为 defaultOption 或作为选择的索引返回。

另请参见:
常量字段值

CANCEL

public static final int CANCEL
CANCEL 选项。

如果指定了此 ConfirmationCallbackoptionType,则可以将此选项指定为 defaultOption 或作为选择的索引返回。

另请参见:
常量字段值