confirmationcallback.html

来自「SUN公司官方J2EE中文帮助文档 应该不错 有兴趣的下来看看 html格式的」· HTML 代码 · 共 794 行 · 第 1/3 页

HTML
794
字号
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/security/auth/callback/ConfirmationCallback.html#getOptionType()">getOptionType</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the option type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/security/auth/callback/ConfirmationCallback.html#getPrompt()">getPrompt</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the prompt.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/security/auth/callback/ConfirmationCallback.html#getSelectedIndex()">getSelectedIndex</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the selected confirmation option.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../javax/security/auth/callback/ConfirmationCallback.html#setSelectedIndex(int)">setSelectedIndex</A></B>(int&nbsp;selection)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the selected confirmation option.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Field Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="UNSPECIFIED_OPTION"><!-- --></A><H3>
UNSPECIFIED_OPTION</H3>
<PRE>
public static final int <B>UNSPECIFIED_OPTION</B></PRE>
<DL>
<DD>Unspecified option type.

 <p> The <code>getOptionType</code> method returns this
 value if this <code>ConfirmationCallback</code> was instantiated
 with <code>options</code> instead of an <code>optionType</code>.</DL>
<HR>

<A NAME="YES_NO_OPTION"><!-- --></A><H3>
YES_NO_OPTION</H3>
<PRE>
public static final int <B>YES_NO_OPTION</B></PRE>
<DL>
<DD>YES/NO confirmation option.

 <p> An underlying security service specifies this as the
 <code>optionType</code> to a <code>ConfirmationCallback</code>
 constructor if it requires a confirmation which can be answered
 with either <code>YES</code> or <code>NO</code>.</DL>
<HR>

<A NAME="YES_NO_CANCEL_OPTION"><!-- --></A><H3>
YES_NO_CANCEL_OPTION</H3>
<PRE>
public static final int <B>YES_NO_CANCEL_OPTION</B></PRE>
<DL>
<DD>YES/NO/CANCEL confirmation confirmation option.

 <p> An underlying security service specifies this as the
 <code>optionType</code> to a <code>ConfirmationCallback</code>
 constructor if it requires a confirmation which can be answered
 with either <code>YES</code>, <code>NO</code> or <code>CANCEL</code>.</DL>
<HR>

<A NAME="OK_CANCEL_OPTION"><!-- --></A><H3>
OK_CANCEL_OPTION</H3>
<PRE>
public static final int <B>OK_CANCEL_OPTION</B></PRE>
<DL>
<DD>OK/CANCEL confirmation confirmation option.

 <p> An underlying security service specifies this as the
 <code>optionType</code> to a <code>ConfirmationCallback</code>
 constructor if it requires a confirmation which can be answered
 with either <code>OK</code> or <code>CANCEL</code>.</DL>
<HR>

<A NAME="YES"><!-- --></A><H3>
YES</H3>
<PRE>
public static final int <B>YES</B></PRE>
<DL>
<DD>YES option.

 <p> If an <code>optionType</code> was specified to this
 <code>ConfirmationCallback</code>, this option may be specified as a
 <code>defaultOption</code> or returned as the selected index.</DL>
<HR>

<A NAME="NO"><!-- --></A><H3>
NO</H3>
<PRE>
public static final int <B>NO</B></PRE>
<DL>
<DD>NO option.

 <p> If an <code>optionType</code> was specified to this
 <code>ConfirmationCallback</code>, this option may be specified as a
 <code>defaultOption</code> or returned as the selected index.</DL>
<HR>

<A NAME="CANCEL"><!-- --></A><H3>
CANCEL</H3>
<PRE>
public static final int <B>CANCEL</B></PRE>
<DL>
<DD>CANCEL option.

 <p> If an <code>optionType</code> was specified to this
 <code>ConfirmationCallback</code>, this option may be specified as a
 <code>defaultOption</code> or returned as the selected index.</DL>
<HR>

<A NAME="OK"><!-- --></A><H3>
OK</H3>
<PRE>
public static final int <B>OK</B></PRE>
<DL>
<DD>OK option.

 <p> If an <code>optionType</code> was specified to this
 <code>ConfirmationCallback</code>, this option may be specified as a
 <code>defaultOption</code> or returned as the selected index.</DL>
<HR>

<A NAME="INFORMATION"><!-- --></A><H3>
INFORMATION</H3>
<PRE>
public static final int <B>INFORMATION</B></PRE>
<DL>
<DD>INFORMATION message type.</DL>
<HR>

<A NAME="WARNING"><!-- --></A><H3>
WARNING</H3>
<PRE>
public static final int <B>WARNING</B></PRE>
<DL>
<DD>WARNING message type.</DL>
<HR>

<A NAME="ERROR"><!-- --></A><H3>
ERROR</H3>
<PRE>
public static final int <B>ERROR</B></PRE>
<DL>
<DD>ERROR message type.</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="ConfirmationCallback(int, int, int)"><!-- --></A><H3>
ConfirmationCallback</H3>
<PRE>
public <B>ConfirmationCallback</B>(int&nbsp;messageType,
                            int&nbsp;optionType,
                            int&nbsp;defaultOption)</PRE>
<DL>
<DD>Construct a <code>ConfirmationCallback</code> with a
 message type, an option type and a default option.

 <p> Underlying security services use this constructor if
 they require either a YES/NO, YES/NO/CANCEL or OK/CANCEL
 confirmation.

 <p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>messageType</CODE> - the message type (<code>INFORMATION</code>,
			<code>WARNING</code> or <code>ERROR</code>). <p><DD><CODE>optionType</CODE> - the option type (<code>YES_NO_OPTION</code>,
			<code>YES_NO_CANCEL_OPTION</code> or
			<code>OK_CANCEL_OPTION</code>). <p><DD><CODE>defaultOption</CODE> - the default option
			from the provided optionType (<code>YES</code>,
			<code>NO</code>, <code>CANCEL</code> or
			<code>OK</code>).<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if messageType is not either
			<code>INFORMATION</code>, <code>WARNING</code>,
			or <code>ERROR</code>, if optionType is not either
			<code>YES_NO_OPTION</code>,
			<code>YES_NO_CANCEL_OPTION</code>, or
			<code>OK_CANCEL_OPTION</code>,
			or if <code>defaultOption</code>
			does not correspond to one of the options in
			<code>optionType</code>.</DL>
</DD>
</DL>
<HR>

<A NAME="ConfirmationCallback(int, java.lang.String[], int)"><!-- --></A><H3>
ConfirmationCallback</H3>
<PRE>
public <B>ConfirmationCallback</B>(int&nbsp;messageType,
                            java.lang.String[]&nbsp;options,
                            int&nbsp;defaultOption)</PRE>
<DL>
<DD>Construct a <code>ConfirmationCallback</code> with a
 message type, a list of options and a default option.

 <p> 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 <code>options</code> array,
 and are displayed by the <code>CallbackHandler</code> implementation
 in a manner consistent with the way preset options are displayed.

 <p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>messageType</CODE> - the message type (<code>INFORMATION</code>,
			<code>WARNING</code> or <code>ERROR</code>). <p><DD><CODE>options</CODE> - the list of confirmation options. <p><DD><CODE>defaultOption</CODE> - the default option, represented as an index
			into the <code>options</code> array.<DT><B>Throws:</B><DD><CODE>java.lang.IllegalArgumentException</CODE> - if messageType is not either
			<code>INFORMATION</code>, <code>WARNING</code>,
			or <code>ERROR</code>, if <code>options</code> is null,
			if <code>options</code> has a length of 0,
			if any element from <code>options</code> is null,
			if any element from <code>options</code>
			has a length of 0, or if <code>defaultOption</code>
			does not lie within the array boundaries of
			<code>options</code>.</DL>
</DD>
</DL>
<HR>

<A NAME="ConfirmationCallback(java.lang.String, int, int, int)"><!-- --></A><H3>
ConfirmationCallback</H3>
<PRE>
public <B>ConfirmationCallback</B>(java.lang.String&nbsp;prompt,
                            int&nbsp;messageType,
                            int&nbsp;optionType,
                            int&nbsp;defaultOption)</PRE>
<DL>
<DD>Construct a <code>ConfirmationCallback</code> with a prompt,
 message type, an option type and a default option.

 <p> Underlying security services use this constructor if
 they require either a YES/NO, YES/NO/CANCEL or OK/CANCEL

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?