📄 xmpperror.html
字号:
<BR> Creates a new error with the specified condition and message infering the type and code.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"><B>Method Summary</B></FONT></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/XMPPError.html#addExtension(org.jivesoftware.smack.packet.PacketExtension)">addExtension</A></B>(<A HREF="../../../../org/jivesoftware/smack/packet/PacketExtension.html" title="interface in org.jivesoftware.smack.packet">PacketExtension</A> extension)</CODE><BR> Adds a packet extension to the error.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/XMPPError.html#getCode()">getCode</A></B>()</CODE><BR> Returns the error code.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/XMPPError.html#getCondition()">getCondition</A></B>()</CODE><BR> Returns the error condition.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/jivesoftware/smack/packet/PacketExtension.html" title="interface in org.jivesoftware.smack.packet">PacketExtension</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/XMPPError.html#getExtension(java.lang.String, java.lang.String)">getExtension</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> elementName, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> namespace)</CODE><BR> Returns the first patcket extension that matches the specified element name and namespace, or <tt>null</tt> if it doesn't exist.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="../../../../org/jivesoftware/smack/packet/PacketExtension.html" title="interface in org.jivesoftware.smack.packet">PacketExtension</A>></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/XMPPError.html#getExtensions()">getExtensions</A></B>()</CODE><BR> Returns an Iterator for the error extensions attached to the xmppError.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/XMPPError.html#getMessage()">getMessage</A></B>()</CODE><BR> Returns the message describing the error, or null if there is no message.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/jivesoftware/smack/packet/XMPPError.Type.html" title="enum in org.jivesoftware.smack.packet">XMPPError.Type</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/XMPPError.html#getType()">getType</A></B>()</CODE><BR> Returns the error type.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/XMPPError.html#setExtension(java.util.List)">setExtension</A></B>(<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="../../../../org/jivesoftware/smack/packet/PacketExtension.html" title="interface in org.jivesoftware.smack.packet">PacketExtension</A>> extension)</CODE><BR> Set the packet extension to the error.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/XMPPError.html#toString()">toString</A></B>()</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/smack/packet/XMPPError.html#toXML()">toXML</A></B>()</CODE><BR> Returns the error as XML.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE> <P><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="XMPPError(org.jivesoftware.smack.packet.XMPPError.Condition)"><!-- --></A><H3>XMPPError</H3><PRE>public <B>XMPPError</B>(<A HREF="../../../../org/jivesoftware/smack/packet/XMPPError.Condition.html" title="class in org.jivesoftware.smack.packet">XMPPError.Condition</A> condition)</PRE><DL><DD>Creates a new error with the specified condition infering the type and code. If the Condition is predefined, client code should be like: new XMPPError(XMPPError.Condition.remote_server_timeout); If the Condition is not predefined, invocations should be like new XMPPError(new XMPPError.Condition("my_own_error"));<P><DL><DT><B>Parameters:</B><DD><CODE>condition</CODE> - the error condition.</DL></DL><HR><A NAME="XMPPError(org.jivesoftware.smack.packet.XMPPError.Condition, java.lang.String)"><!-- --></A><H3>XMPPError</H3><PRE>public <B>XMPPError</B>(<A HREF="../../../../org/jivesoftware/smack/packet/XMPPError.Condition.html" title="class in org.jivesoftware.smack.packet">XMPPError.Condition</A> condition, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> messageText)</PRE><DL><DD>Creates a new error with the specified condition and message infering the type and code. If the Condition is predefined, client code should be like: new XMPPError(XMPPError.Condition.remote_server_timeout, "Error Explanation"); If the Condition is not predefined, invocations should be like new XMPPError(new XMPPError.Condition("my_own_error"), "Error Explanation");<P><DL><DT><B>Parameters:</B><DD><CODE>condition</CODE> - the error condition.<DD><CODE>messageText</CODE> - a message describing the error.</DL></DL><HR><A NAME="XMPPError(int)"><!-- --></A><H3>XMPPError</H3><PRE>public <B>XMPPError</B>(int code)</PRE><DL><DD><B>Deprecated.</B> <I>new errors should be created using the constructor XMPPError(condition)</I><P><DD>Creates a new error with the specified code and no message.<P><DL><DT><B>Parameters:</B><DD><CODE>code</CODE> - the error code.</DL></DL><HR><A NAME="XMPPError(int, java.lang.String)"><!-- --></A><H3>XMPPError</H3><PRE>public <B>XMPPError</B>(int code, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> message)</PRE><DL><DD><B>Deprecated.</B> <I>new errors should be created using the constructor XMPPError(condition, message)</I><P><DD>Creates a new error with the specified code and message. deprecated<P><DL><DT><B>Parameters:</B><DD><CODE>code</CODE> - the error code.<DD><CODE>message</CODE> - a message describing the error.</DL></DL><HR><A NAME="XMPPError(int, org.jivesoftware.smack.packet.XMPPError.Type, java.lang.String, java.lang.String, java.util.List)"><!-- --></A><H3>XMPPError</H3><PRE>public <B>XMPPError</B>(int code, <A HREF="../../../../org/jivesoftware/smack/packet/XMPPError.Type.html" title="enum in org.jivesoftware.smack.packet">XMPPError.Type</A> type, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> condition, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> message, <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/List.html" title="class or interface in java.util">List</A><<A HREF="../../../../org/jivesoftware/smack/packet/PacketExtension.html" title="interface in org.jivesoftware.smack.packet">PacketExtension</A>> extension)</PRE><DL><DD>Creates a new error with the specified code, type, condition and message. This constructor is used when the condition is not recognized automatically by XMPPError i.e. there is not a defined instance of ErrorCondition or it does not applies the default specification.<P><DL><DT><B>Parameters:</B><DD><CODE>code</CODE> - the error code.<DD><CODE>type</CODE> - the error type.<DD><CODE>condition</CODE> - the error condition.<DD><CODE>message</CODE> - a message describing the error.</DL></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Method Detail</B></FONT></TH></TR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -