⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 roster.html

📁 开源软件openfire的API文件。进行openfire的二次开发所必需的工具。
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<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></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/roster/Roster.html#getUsername()">getUsername</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Return the username of the user or chatbot that owns this roster.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/roster/Roster.html#isRosterItem(org.xmpp.packet.JID)">isRosterItem</A></B>(<A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A>&nbsp;user)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns true if the specified user is a member of the roster, false otherwise.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="../../../../org/jivesoftware/openfire/roster/RosterItem.html" title="class in org.jivesoftware.openfire.roster">RosterItem</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/jivesoftware/openfire/roster/Roster.html#provideRosterItem(org.xmpp.packet.JID, java.lang.String, java.util.List, boolean, boolean)">provideRosterItem</A></B>(<A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A>&nbsp;user,                  <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>&nbsp;nickname,                  <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A>&lt;<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>&gt;&nbsp;groups,                  boolean&nbsp;push,                  boolean&nbsp;persistent)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generate a new RosterItem for use with createRosterItem.</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="../../../../org/jivesoftware/openfire/roster/Roster.html#readExternal(java.io.ObjectInput)">readExternal</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/ObjectInput.html" title="class or interface in java.io">ObjectInput</A>&nbsp;in)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</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="../../../../org/jivesoftware/openfire/roster/Roster.html#updateRosterItem(org.jivesoftware.openfire.roster.RosterItem)">updateRosterItem</A></B>(<A HREF="../../../../org/jivesoftware/openfire/roster/RosterItem.html" title="class in org.jivesoftware.openfire.roster">RosterItem</A>&nbsp;item)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Update an item that is already in the roster.</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="../../../../org/jivesoftware/openfire/roster/Roster.html#writeExternal(java.io.ObjectOutput)">writeExternal</A></B>(<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/io/ObjectOutput.html" title="class or interface in java.io">ObjectOutput</A>&nbsp;out)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TABLE>&nbsp;<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#toString()" title="class or interface in java.lang">toString</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>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><A NAME="field_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>Field Detail</B></FONT></TH></TR></TABLE><A NAME="rosterItems"><!-- --></A><H3>rosterItems</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ConcurrentHashMap.html" title="class or interface in java.util.concurrent">ConcurrentHashMap</A>&lt;<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>,<A HREF="../../../../org/jivesoftware/openfire/roster/RosterItem.html" title="class in org.jivesoftware.openfire.roster">RosterItem</A>&gt; <B>rosterItems</B></PRE><DL><DD>Roster item cache - table: key jabberid string; value roster item.<P><DL></DL></DL><HR><A NAME="implicitFrom"><!-- --></A><H3>implicitFrom</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ConcurrentHashMap.html" title="class or interface in java.util.concurrent">ConcurrentHashMap</A>&lt;<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>,<A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Set.html" title="class or interface in java.util">Set</A>&lt;<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>&gt;&gt; <B>implicitFrom</B></PRE><DL><DD>Contacts with subscription FROM that only exist due to shared groups key: jabberid string; value: groups why the implicit roster item exists (aka invisibleSharedGroups).<P><DL></DL></DL><!-- ========= 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="Roster()"><!-- --></A><H3>Roster</H3><PRE>public <B>Roster</B>()</PRE><DL><DD>Constructor added for Externalizable. Do not use this constructor.<P></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="isRosterItem(org.xmpp.packet.JID)"><!-- --></A><H3>isRosterItem</H3><PRE>public boolean <B>isRosterItem</B>(<A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A>&nbsp;user)</PRE><DL><DD>Returns true if the specified user is a member of the roster, false otherwise.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>user</CODE> - the user object to check.<DT><B>Returns:</B><DD>true if the specified user is a member of the roster, false otherwise.</DL></DD></DL><HR><A NAME="getRosterItems()"><!-- --></A><H3>getRosterItems</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A>&lt;<A HREF="../../../../org/jivesoftware/openfire/roster/RosterItem.html" title="class in org.jivesoftware.openfire.roster">RosterItem</A>&gt; <B>getRosterItems</B>()</PRE><DL><DD>Returns a collection of users in this roster.<p> Note: Roster items with subscription type FROM that exist only because of shared groups are not going to be returned.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>a collection of users in this roster.</DL></DD></DL><HR><A NAME="getRosterItem(org.xmpp.packet.JID)"><!-- --></A><H3>getRosterItem</H3><PRE>public <A HREF="../../../../org/jivesoftware/openfire/roster/RosterItem.html" title="class in org.jivesoftware.openfire.roster">RosterItem</A> <B>getRosterItem</B>(<A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A>&nbsp;user)                         throws <A HREF="../../../../org/jivesoftware/openfire/user/UserNotFoundException.html" title="class in org.jivesoftware.openfire.user">UserNotFoundException</A></PRE><DL><DD>Returns the roster item that is associated with the specified JID. If no roster item was found then a UserNotFoundException will be thrown.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>user</CODE> - the XMPPAddress for the roster item to retrieve<DT><B>Returns:</B><DD>The roster item associated with the user XMPPAddress.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/user/UserNotFoundException.html" title="class in org.jivesoftware.openfire.user">UserNotFoundException</A></CODE> - if no roster item was found for the specified JID.</DL></DD></DL><HR><A NAME="createRosterItem(org.xmpp.packet.JID, boolean, boolean)"><!-- --></A><H3>createRosterItem</H3><PRE>public <A HREF="../../../../org/jivesoftware/openfire/roster/RosterItem.html" title="class in org.jivesoftware.openfire.roster">RosterItem</A> <B>createRosterItem</B>(<A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A>&nbsp;user,                                   boolean&nbsp;push,                                   boolean&nbsp;persistent)                            throws <A HREF="../../../../org/jivesoftware/openfire/user/UserAlreadyExistsException.html" title="class in org.jivesoftware.openfire.user">UserAlreadyExistsException</A>,                                   <A HREF="../../../../org/jivesoftware/openfire/SharedGroupException.html" title="class in org.jivesoftware.openfire">SharedGroupException</A></PRE><DL><DD>Create a new item to the roster. Roster items may not be created that contain the same user address as an existing item.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>user</CODE> - The item to add to the roster.<DD><CODE>push</CODE> - True if the new item must be pushed to the user.<DD><CODE>persistent</CODE> - True if the new roster item should be persisted to the DB.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/user/UserAlreadyExistsException.html" title="class in org.jivesoftware.openfire.user">UserAlreadyExistsException</A></CODE><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/SharedGroupException.html" title="class in org.jivesoftware.openfire">SharedGroupException</A></CODE></DL></DD></DL><HR><A NAME="createRosterItem(org.xmpp.packet.JID, java.lang.String, java.util.List, boolean, boolean)"><!-- --></A><H3>createRosterItem</H3><PRE>public <A HREF="../../../../org/jivesoftware/openfire/roster/RosterItem.html" title="class in org.jivesoftware.openfire.roster">RosterItem</A> <B>createRosterItem</B>(<A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A>&nbsp;user,                                   <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>&nbsp;nickname,                                   <A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/util/List.html" title="class or interface in java.util">List</A>&lt;<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>&gt;&nbsp;groups,                                   boolean&nbsp;push,                                   boolean&nbsp;persistent)                            throws <A HREF="../../../../org/jivesoftware/openfire/user/UserAlreadyExistsException.html" title="class in org.jivesoftware.openfire.user">UserAlreadyExistsException</A>,                                   <A HREF="../../../../org/jivesoftware/openfire/SharedGroupException.html" title="class in org.jivesoftware.openfire">SharedGroupException</A></PRE><DL><DD>Create a new item to the roster. Roster items may not be created that contain the same user address as an existing item.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>user</CODE> - The item to add to the roster.<DD><CODE>nickname</CODE> - The nickname for the roster entry (can be null).<DD><CODE>push</CODE> - True if the new item must be push to the user.<DD><CODE>persistent</CODE> - True if the new roster item should be persisted to the DB.<DD><CODE>groups</CODE> - The list of groups to assign this roster item to (can be null)<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/user/UserAlreadyExistsException.html" title="class in org.jivesoftware.openfire.user">UserAlreadyExistsException</A></CODE><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/SharedGroupException.html" title="class in org.jivesoftware.openfire">SharedGroupException</A></CODE></DL></DD></DL><HR><A NAME="createRosterItem(org.xmpp.packet.Roster.Item)"><!-- --></A><H3>createRosterItem</H3><PRE>public void <B>createRosterItem</B>(<A HREF="../../../../org/xmpp/packet/Roster.Item.html" title="class in org.xmpp.packet">Roster.Item</A>&nbsp;item)                      throws <A HREF="../../../../org/jivesoftware/openfire/user/UserAlreadyExistsException.html" title="class in org.jivesoftware.openfire.user">UserAlreadyExistsException</A>,                             <A HREF="../../../../org/jivesoftware/openfire/SharedGroupException.html" title="class in org.jivesoftware.openfire">SharedGroupException</A></PRE><DL><DD>Create a new item to the roster based as a copy of the given item. Roster items may not be created that contain the same user address as an existing item in the roster.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>item</CODE> - the item to copy and add to the roster.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/user/UserAlreadyExistsException.html" title="class in org.jivesoftware.openfire.user">UserAlreadyExistsException</A></CODE><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/SharedGroupException.html" title="class in org.jivesoftware.openfire">SharedGroupException</A></CODE></DL></DD></DL><HR>

⌨️ 快捷键说明

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