📄 iq.html
字号:
Returns the child element of this IQ.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../org/xmpp/packet/PacketExtension.html" title="class in org.xmpp.packet">PacketExtension</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/xmpp/packet/IQ.html#getExtension(java.lang.String, java.lang.String)">getExtension</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> namespace)</CODE><BR> Returns a <A HREF="../../../org/xmpp/packet/PacketExtension.html" title="class in org.xmpp.packet"><CODE>PacketExtension</CODE></A> on the first element found in this packet's child element for the specified <tt>name</tt> and <tt>namespace</tt> or <tt>null</tt> if none was found.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../org/xmpp/packet/IQ.Type.html" title="enum in org.xmpp.packet">IQ.Type</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/xmpp/packet/IQ.html#getType()">getType</A></B>()</CODE><BR> Returns the type of this IQ.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/xmpp/packet/IQ.html#isRequest()">isRequest</A></B>()</CODE><BR> Convenience routine to indicate if this is a request stanza.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/xmpp/packet/IQ.html#isResponse()">isResponse</A></B>()</CODE><BR> Convenience routine to indicate if this is a response stanza.</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/xmpp/packet/IQ.html#setChildElement(org.dom4j.Element)">setChildElement</A></B>(org.dom4j.Element childElement)</CODE><BR> Sets the child element of this IQ.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> org.dom4j.Element</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/xmpp/packet/IQ.html#setChildElement(java.lang.String, java.lang.String)">setChildElement</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> name, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> namespace)</CODE><BR> Sets the child element of this IQ by constructing a new Element with the given name and namespace.</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/xmpp/packet/IQ.html#setType(org.xmpp.packet.IQ.Type)">setType</A></B>(<A HREF="../../../org/xmpp/packet/IQ.Type.html" title="enum in org.xmpp.packet">IQ.Type</A> type)</CODE><BR> Sets the type of this IQ.</TD></TR></TABLE> <A NAME="methods_inherited_from_class_org.xmpp.packet.Packet"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TH ALIGN="left"><B>Methods inherited from class org.xmpp.packet.<A HREF="../../../org/xmpp/packet/Packet.html" title="class in org.xmpp.packet">Packet</A></B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../../org/xmpp/packet/Packet.html#getElement()">getElement</A>, <A HREF="../../../org/xmpp/packet/Packet.html#getError()">getError</A>, <A HREF="../../../org/xmpp/packet/Packet.html#getFrom()">getFrom</A>, <A HREF="../../../org/xmpp/packet/Packet.html#getID()">getID</A>, <A HREF="../../../org/xmpp/packet/Packet.html#getTo()">getTo</A>, <A HREF="../../../org/xmpp/packet/Packet.html#setError(org.xmpp.packet.PacketError.Condition)">setError</A>, <A HREF="../../../org/xmpp/packet/Packet.html#setError(org.xmpp.packet.PacketError)">setError</A>, <A HREF="../../../org/xmpp/packet/Packet.html#setFrom(org.xmpp.packet.JID)">setFrom</A>, <A HREF="../../../org/xmpp/packet/Packet.html#setFrom(java.lang.String)">setFrom</A>, <A HREF="../../../org/xmpp/packet/Packet.html#setID(java.lang.String)">setID</A>, <A HREF="../../../org/xmpp/packet/Packet.html#setTo(org.xmpp.packet.JID)">setTo</A>, <A HREF="../../../org/xmpp/packet/Packet.html#setTo(java.lang.String)">setTo</A>, <A HREF="../../../org/xmpp/packet/Packet.html#toString()">toString</A>, <A HREF="../../../org/xmpp/packet/Packet.html#toXML()">toXML</A></CODE></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.5.0/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.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.5.0/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.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.5.0/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.5.0/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="IQ()"><!-- --></A><H3>IQ</H3><PRE>public <B>IQ</B>()</PRE><DL><DD>Constructs a new IQ with an automatically generated ID and a type of <A HREF="../../../org/xmpp/packet/IQ.Type.html#get"><CODE>IQ.Type.get</CODE></A>.<P></DL><HR><A NAME="IQ(org.xmpp.packet.IQ.Type)"><!-- --></A><H3>IQ</H3><PRE>public <B>IQ</B>(<A HREF="../../../org/xmpp/packet/IQ.Type.html" title="enum in org.xmpp.packet">IQ.Type</A> type)</PRE><DL><DD>Constructs a new IQ using the specified type. A packet ID will be automatically generated.<P><DL><DT><B>Parameters:</B><DD><CODE>type</CODE> - the IQ type.</DL></DL><HR><A NAME="IQ(org.xmpp.packet.IQ.Type, java.lang.String)"><!-- --></A><H3>IQ</H3><PRE>public <B>IQ</B>(<A HREF="../../../org/xmpp/packet/IQ.Type.html" title="enum in org.xmpp.packet">IQ.Type</A> type, <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> ID)</PRE><DL><DD>Constructs a new IQ using the specified type and ID.<P><DL><DT><B>Parameters:</B><DD><CODE>ID</CODE> - the packet ID of the IQ.<DD><CODE>type</CODE> - the IQ type.</DL></DL><HR><A NAME="IQ(org.dom4j.Element)"><!-- --></A><H3>IQ</H3><PRE>public <B>IQ</B>(org.dom4j.Element element)</PRE><DL><DD>Constructs a new IQ using an existing Element. This is useful for parsing incoming IQ Elements into IQ objects.<P><DL><DT><B>Parameters:</B><DD><CODE>element</CODE> - the IQ Element.</DL></DL><HR><A NAME="IQ(org.dom4j.Element, boolean)"><!-- --></A><H3>IQ</H3><PRE>public <B>IQ</B>(org.dom4j.Element element, boolean skipValidation)</PRE><DL><DD>Constructs a new IQ using an existing Element. This is useful for parsing incoming IQ Elements into IQ objects. Stringprep validation on the TO address can be disabled. The FROM address will not be validated since the server is the one that sets that value.<P><DL><DT><B>Parameters:</B><DD><CODE>element</CODE> - the IQ Element.<DD><CODE>skipValidation</CODE> - true if stringprep should not be applied to the TO address.</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></TABLE><A NAME="getType()"><!-- --></A><H3>getType</H3><PRE>public <A HREF="../../../org/xmpp/packet/IQ.Type.html" title="enum in org.xmpp.packet">IQ.Type</A> <B>getType</B>()</PRE><DL><DD>Returns the type of this IQ.<P><DD><DL><DT><B>Returns:</B><DD>the IQ type.<DT><B>See Also:</B><DD><A HREF="../../../org/xmpp/packet/IQ.Type.html" title="enum in org.xmpp.packet"><CODE>IQ.Type</CODE></A></DL></DD></DL><HR><A NAME="setType(org.xmpp.packet.IQ.Type)"><!-- --></A><H3>setType</H3><PRE>public void <B>setType</B>(<A HREF="../../../org/xmpp/packet/IQ.Type.html" title="enum in org.xmpp.packet">IQ.Type</A> type)</PRE><DL><DD>Sets the type of this IQ.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>type</CODE> - the IQ type.<DT><B>See Also:</B><DD><A HREF="../../../org/xmpp/packet/IQ.Type.html" title="enum in org.xmpp.packet"><CODE>IQ.Type</CODE></A></DL></DD></DL><HR><A NAME="isRequest()"><!-- --></A><H3>isRequest</H3><PRE>public boolean <B>isRequest</B>()</PRE><DL><DD>Convenience routine to indicate if this is a request stanza. (get or set)<P><DD><DL><DT><B>Returns:</B><DD>True or false if this is a request stanza</DL></DD></DL><HR><A NAME="isResponse()"><!-- --></A><H3>isResponse</H3><PRE>public boolean <B>isResponse</B>()</PRE><DL><DD>Convenience routine to indicate if this is a response stanza. (result or error)<P><DD><DL><DT><B>Returns:</B><DD>True or false if this is a response stanza</DL></DD></DL><HR><A NAME="getChildElement()"><!-- --></A><H3>getChildElement</H3><PRE>public org.dom4j.Element <B>getChildElement</B>()</PRE><DL><DD>Returns the child element of this IQ. IQ packets may have a single child element in an extended namespace. This is a convenience method to avoid manipulating the underlying packet's Element instance directly.<p> An IQ child element in extended namespaces is used to extend the features of XMPP. Although any valid XML can be included in a child element in an extended namespace, many common features have been standardized as <a href="http://www.jabber.org/jeps">Jabber Enhancement Proposals</a> (JEPs).<P><DD><DL><DT><B>Returns:</B><DD>the child element.</DL></DD></DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -