confirmationcallback.html
来自「SUN公司官方J2EE中文帮助文档 应该不错 有兴趣的下来看看 html格式的」· HTML 代码 · 共 794 行 · 第 1/3 页
HTML
794 行
confirmation.
<p><DD><DL>
<DT><B>Parameters:</B><DD><CODE>prompt</CODE> - the prompt used to describe the list of options. <p><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 <code>prompt</code> is null,
if <code>prompt</code> has a length of 0,
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(java.lang.String, int, java.lang.String[], int)"><!-- --></A><H3>
ConfirmationCallback</H3>
<PRE>
public <B>ConfirmationCallback</B>(java.lang.String prompt,
int messageType,
java.lang.String[] options,
int defaultOption)</PRE>
<DL>
<DD>Construct a <code>ConfirmationCallback</code> with a prompt,
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>prompt</CODE> - the prompt used to describe the list of options. <p><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 <code>prompt</code> is null,
if <code>prompt</code> has a length of 0,
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>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>
<A NAME="getPrompt()"><!-- --></A><H3>
getPrompt</H3>
<PRE>
public java.lang.String <B>getPrompt</B>()</PRE>
<DL>
<DD>Get the prompt.
<p><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the prompt, or null if this <code>ConfirmationCallback</code>
was instantiated without a <code>prompt</code>.</DL>
</DD>
</DL>
<HR>
<A NAME="getMessageType()"><!-- --></A><H3>
getMessageType</H3>
<PRE>
public int <B>getMessageType</B>()</PRE>
<DL>
<DD>Get the message type.
<p><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the message type (<code>INFORMATION</code>,
<code>WARNING</code> or <code>ERROR</code>).</DL>
</DD>
</DL>
<HR>
<A NAME="getOptionType()"><!-- --></A><H3>
getOptionType</H3>
<PRE>
public int <B>getOptionType</B>()</PRE>
<DL>
<DD>Get the option type.
<p> If this method returns <code>UNSPECIFIED_OPTION</code>, then this
<code>ConfirmationCallback</code> was instantiated with
<code>options</code> instead of an <code>optionType</code>.
In this case, invoke the <code>getOptions</code> method
to determine which confirmation options to display.
<p><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the option type (<code>YES_NO_OPTION</code>,
<code>YES_NO_CANCEL_OPTION</code> or
<code>OK_CANCEL_OPTION</code>), or
<code>UNSPECIFIED_OPTION</code> if this
<code>ConfirmationCallback</code> was instantiated with
<code>options</code> instead of an <code>optionType</code>.</DL>
</DD>
</DL>
<HR>
<A NAME="getOptions()"><!-- --></A><H3>
getOptions</H3>
<PRE>
public java.lang.String[] <B>getOptions</B>()</PRE>
<DL>
<DD>Get the confirmation options.
<p><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the list of confirmation options, or null if this
<code>ConfirmationCallback</code> was instantiated with
an <code>optionType</code> instead of <code>options</code>.</DL>
</DD>
</DL>
<HR>
<A NAME="getDefaultOption()"><!-- --></A><H3>
getDefaultOption</H3>
<PRE>
public int <B>getDefaultOption</B>()</PRE>
<DL>
<DD>Get the default option.
<p><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the default option, represented as
<code>YES</code>, <code>NO</code>, <code>OK</code> or
<code>CANCEL</code> if an <code>optionType</code>
was specified to the constructor of this
<code>ConfirmationCallback</code>.
Otherwise, this method returns the default option as
an index into the
<code>options</code> array specified to the constructor
of this <code>ConfirmationCallback</code>.</DL>
</DD>
</DL>
<HR>
<A NAME="setSelectedIndex(int)"><!-- --></A><H3>
setSelectedIndex</H3>
<PRE>
public void <B>setSelectedIndex</B>(int selection)</PRE>
<DL>
<DD>Set the selected confirmation option.
<p><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>selection</CODE> - the selection represented as <code>YES</code>,
<code>NO</code>, <code>OK</code> or <code>CANCEL</code>
if an <code>optionType</code> was specified to the constructor
of this <code>ConfirmationCallback</code>.
Otherwise, the selection represents the index into the
<code>options</code> array specified to the constructor
of this <code>ConfirmationCallback</code>.</DL>
</DD>
</DL>
<HR>
<A NAME="getSelectedIndex()"><!-- --></A><H3>
getSelectedIndex</H3>
<PRE>
public int <B>getSelectedIndex</B>()</PRE>
<DL>
<DD>Get the selected confirmation option.
<p><DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the selected confirmation option represented as
<code>YES</code>, <code>NO</code>, <code>OK</code> or
<code>CANCEL</code> if an <code>optionType</code>
was specified to the constructor of this
<code>ConfirmationCallback</code>.
Otherwise, this method returns the selected confirmation
option as an index into the
<code>options</code> array specified to the constructor
of this <code>ConfirmationCallback</code>.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../javax/security/auth/callback/ChoiceCallback.html"><B>PREV CLASS</B></A>
<A HREF="../../../../javax/security/auth/callback/LanguageCallback.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../index.html" TARGET="_top"><B>FRAMES</B></A>
<A HREF="ConfirmationCallback.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->
<HR>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?