📄 rosterexchange.html
字号:
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="RosterExchange()"><!-- --></A><H3>RosterExchange</H3><PRE>public <B>RosterExchange</B>()</PRE><DL><DD>Creates a new empty roster exchange package.<P></DL><HR><A NAME="RosterExchange(org.jivesoftware.smack.Roster)"><!-- --></A><H3>RosterExchange</H3><PRE>public <B>RosterExchange</B>(<A HREF="../../../../org/jivesoftware/smack/Roster.html" title="class in org.jivesoftware.smack">Roster</A> roster)</PRE><DL><DD>Creates a new roster exchange package with the entries specified in roster.<P><DL><DT><B>Parameters:</B><DD><CODE>roster</CODE> - the roster to send to other XMPP entity.</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="addRosterEntry(org.jivesoftware.smack.RosterEntry)"><!-- --></A><H3>addRosterEntry</H3><PRE>public void <B>addRosterEntry</B>(<A HREF="../../../../org/jivesoftware/smack/RosterEntry.html" title="class in org.jivesoftware.smack">RosterEntry</A> rosterEntry)</PRE><DL><DD>Adds a roster entry to the packet.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>rosterEntry</CODE> - a roster entry to add.</DL></DD></DL><HR><A NAME="addRosterEntry(org.jivesoftware.smackx.RemoteRosterEntry)"><!-- --></A><H3>addRosterEntry</H3><PRE>public void <B>addRosterEntry</B>(<A HREF="../../../../org/jivesoftware/smackx/RemoteRosterEntry.html" title="class in org.jivesoftware.smackx">RemoteRosterEntry</A> remoteRosterEntry)</PRE><DL><DD>Adds a remote roster entry to the packet.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>remoteRosterEntry</CODE> - a remote roster entry to add.</DL></DD></DL><HR><A NAME="getElementName()"><!-- --></A><H3>getElementName</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getElementName</B>()</PRE><DL><DD>Returns the XML element name of the extension sub-packet root element. Always returns "x"<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/smack/packet/PacketExtension.html#getElementName()">getElementName</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/smack/packet/PacketExtension.html" title="interface in org.jivesoftware.smack.packet">PacketExtension</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the XML element name of the packet extension.</DL></DD></DL><HR><A NAME="getNamespace()"><!-- --></A><H3>getNamespace</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>getNamespace</B>()</PRE><DL><DD>Returns the XML namespace of the extension sub-packet root element. According the specification the namespace is always "jabber:x:roster" (which is not to be confused with the 'jabber:iq:roster' namespace<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/smack/packet/PacketExtension.html#getNamespace()">getNamespace</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/smack/packet/PacketExtension.html" title="interface in org.jivesoftware.smack.packet">PacketExtension</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the XML namespace of the packet extension.</DL></DD></DL><HR><A NAME="getRosterEntries()"><!-- --></A><H3>getRosterEntries</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/util/Iterator.html" title="class or interface in java.util">Iterator</A> <B>getRosterEntries</B>()</PRE><DL><DD>Returns an Iterator for the roster entries in the packet.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>an Iterator for the roster entries in the packet.</DL></DD></DL><HR><A NAME="getEntryCount()"><!-- --></A><H3>getEntryCount</H3><PRE>public int <B>getEntryCount</B>()</PRE><DL><DD>Returns a count of the entries in the roster exchange.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>the number of entries in the roster exchange.</DL></DD></DL><HR><A NAME="toXML()"><!-- --></A><H3>toXML</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.3/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>toXML</B>()</PRE><DL><DD>Returns the XML representation of a Roster Item Exchange according the specification. Usually the XML representation will be inside of a Message XML representation like in the following example: <pre> <message id="MlIpV-4" to="gato1@gato.home" from="gato3@gato.home/Smack"> <subject>Any subject you want</subject> <body>This message contains roster items.</body> <x xmlns="jabber:x:roster"> <item jid="gato1@gato.home"/> <item jid="gato2@gato.home"/> </x> </message> </pre><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/smack/packet/PacketExtension.html#toXML()">toXML</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/smack/packet/PacketExtension.html" title="interface in org.jivesoftware.smack.packet">PacketExtension</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>the packet extension as XML.</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ======= START OF BOTTOM NAVBAR ====== --><A NAME="navbar_bottom"><!-- --></A><A HREF="#skip-navbar_bottom" title="Skip navigation links"></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> <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><b>Smack</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../org/jivesoftware/smackx/packet/PrivateData.html" title="interface in org.jivesoftware.smackx.packet"><B>PREV CLASS</B></A> <A HREF="../../../../org/jivesoftware/smackx/packet/SharedGroupsInfo.html" title="class in org.jivesoftware.smackx.packet"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?org/jivesoftware/smackx/packet/RosterExchange.html" target="_top"><B>FRAMES</B></A> <A HREF="RosterExchange.html" target="_top"><B>NO FRAMES</B></A> <SCRIPT type="text/javascript"> <!-- if(window==top) { document.writeln('<A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A>'); } //--></SCRIPT><NOSCRIPT> <A HREF="../../../../allclasses-noframe.html"><B>All Classes</B></A></NOSCRIPT></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: NESTED | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><i>Copyright © 2003-2007 Jive Software. </i></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -