📄 presencemanager.html
字号:
<DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.jivesoftware.openfire.PresenceManager.SORT_USERNAME">Constant Field Values</A></DL></DL><HR><A NAME="SORT_ONLINE_TIME"><!-- --></A><H3>SORT_ONLINE_TIME</H3><PRE>static final int <B>SORT_ONLINE_TIME</B></PRE><DL><DD>Sort by online time.<P><DL><DT><B>See Also:</B><DD><A HREF="../../../constant-values.html#org.jivesoftware.openfire.PresenceManager.SORT_ONLINE_TIME">Constant Field Values</A></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="isAvailable(org.jivesoftware.openfire.user.User)"><!-- --></A><H3>isAvailable</H3><PRE>boolean <B>isAvailable</B>(<A HREF="../../../org/jivesoftware/openfire/user/User.html" title="class in org.jivesoftware.openfire.user">User</A> user)</PRE><DL><DD><p>Returns the availability of the user.<p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>user</CODE> - the user who's availability is in question<DT><B>Returns:</B><DD>true if the user as available for messaging (1 or more available sessions)</DL></DD></DL><HR><A NAME="getPresence(org.jivesoftware.openfire.user.User)"><!-- --></A><H3>getPresence</H3><PRE><A HREF="../../../org/xmpp/packet/Presence.html" title="class in org.xmpp.packet">Presence</A> <B>getPresence</B>(<A HREF="../../../org/jivesoftware/openfire/user/User.html" title="class in org.jivesoftware.openfire.user">User</A> user)</PRE><DL><DD>Returns the user's current presence, or <tt>null</tt> if the user is unavailable. If the user is connected with more than one session, the user's "most available" presence status is returned.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>user</CODE> - the user.<DT><B>Returns:</B><DD>the user's current presence.</DL></DD></DL><HR><A NAME="getPresences(java.lang.String)"><!-- --></A><H3>getPresences</H3><PRE><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><<A HREF="../../../org/xmpp/packet/Presence.html" title="class in org.xmpp.packet">Presence</A>> <B>getPresences</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> username)</PRE><DL><DD>Returns all presences for the user, or <tt>null</tt> if the user is unavailable.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>username</CODE> - the name of the user.<DT><B>Returns:</B><DD>the Presence packets for all the users's connected sessions.</DL></DD></DL><HR><A NAME="probePresence(org.xmpp.packet.JID, org.xmpp.packet.JID)"><!-- --></A><H3>probePresence</H3><PRE>void <B>probePresence</B>(<A HREF="../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A> prober, <A HREF="../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A> probee)</PRE><DL><DD>Probes the presence of the given XMPPAddress and attempts to send it to the given user. If the user probing the presence is using his bare JID then the probee's presence will be sent to all connected resources of the prober.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>prober</CODE> - The user requesting the probe<DD><CODE>probee</CODE> - The XMPPAddress whos presence we would like sent have have probed</DL></DD></DL><HR><A NAME="handleProbe(org.xmpp.packet.Presence)"><!-- --></A><H3>handleProbe</H3><PRE>void <B>handleProbe</B>(<A HREF="../../../org/xmpp/packet/Presence.html" title="class in org.xmpp.packet">Presence</A> packet) throws <A HREF="../../../org/jivesoftware/openfire/auth/UnauthorizedException.html" title="class in org.jivesoftware.openfire.auth">UnauthorizedException</A></PRE><DL><DD>Handle a presence probe sent by a remote server. The logic to apply is the following: If the remote user is not in the local user's roster with a subscription state of "From", or "Both", then return a presence stanza of type "error" in response to the presence probe. Otherwise, answer the presence of the local user sessions or the last unavailable presence.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>packet</CODE> - the received probe presence from a remote server.<DT><B>Throws:</B><DD><CODE><A HREF="../../../org/jivesoftware/openfire/auth/UnauthorizedException.html" title="class in org.jivesoftware.openfire.auth">UnauthorizedException</A></CODE></DL></DD></DL><HR><A NAME="canProbePresence(org.xmpp.packet.JID, java.lang.String)"><!-- --></A><H3>canProbePresence</H3><PRE>boolean <B>canProbePresence</B>(<A HREF="../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A> prober, <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> probee) throws <A HREF="../../../org/jivesoftware/openfire/user/UserNotFoundException.html" title="class in org.jivesoftware.openfire.user">UserNotFoundException</A></PRE><DL><DD>Returns true if the the prober is allowed to see the presence of the probee.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>prober</CODE> - the user that is trying to probe the presence of another user.<DD><CODE>probee</CODE> - the username of the uset that is being probed.<DT><B>Returns:</B><DD>true if the the prober is allowed to see the presence of the probee.<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 the probee does not exist in the local server or the prober is not present in the roster of the probee.</DL></DD></DL><HR><A NAME="sendUnavailableFromSessions(org.xmpp.packet.JID, org.xmpp.packet.JID)"><!-- --></A><H3>sendUnavailableFromSessions</H3><PRE>void <B>sendUnavailableFromSessions</B>(<A HREF="../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A> recipientJID, <A HREF="../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A> userJID)</PRE><DL><DD>Sends unavailable presence from all of the user's available resources to the remote user. When a remote user unsubscribes from the presence of a local user then the server should send to the remote user unavailable presence from all of the local user's available resources. Moreover, if the recipient user is a local user then the unavailable presence will be sent to all user resources.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>recipientJID</CODE> - JID of the remote user that will receive the unavailable presences.<DD><CODE>userJID</CODE> - JID of the local user.</DL></DD></DL><HR><A NAME="userAvailable(org.xmpp.packet.Presence)"><!-- --></A><H3>userAvailable</H3><PRE>void <B>userAvailable</B>(<A HREF="../../../org/xmpp/packet/Presence.html" title="class in org.xmpp.packet">Presence</A> presence)</PRE><DL><DD>Notification message saying that the sender of the given presence just became available.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>presence</CODE> - the presence sent by the available user.</DL></DD></DL><HR><A NAME="userUnavailable(org.xmpp.packet.Presence)"><!-- --></A><H3>userUnavailable</H3><PRE>void <B>userUnavailable</B>(<A HREF="../../../org/xmpp/packet/Presence.html" title="class in org.xmpp.packet">Presence</A> presence)</PRE><DL><DD>Notification message saying that the sender of the given presence just became unavailable.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>presence</CODE> - the presence sent by the unavailable user.</DL></DD></DL><HR><A NAME="getLastPresenceStatus(org.jivesoftware.openfire.user.User)"><!-- --></A><H3>getLastPresenceStatus</H3><PRE><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> <B>getLastPresenceStatus</B>(<A HREF="../../../org/jivesoftware/openfire/user/User.html" title="class in org.jivesoftware.openfire.user">User</A> user)</PRE><DL><DD>Returns the status sent by the user in his last unavailable presence or <tt>null</tt> if the user is online or never set such information.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>user</CODE> - the user to return his last status information<DT><B>Returns:</B><DD>the status sent by the user in his last unavailable presence or <tt>null</tt> if the user is online or never set such information.</DL></DD></DL><HR><A NAME="getLastActivity(org.jivesoftware.openfire.user.User)"><!-- --></A><H3>getLastActivity</H3><PRE>long <B>getLastActivity</B>(<A HREF="../../../org/jivesoftware/openfire/user/User.html" title="class in org.jivesoftware.openfire.user">User</A> user)</PRE><DL><DD>Returns the number of milliseconds since the user went offline or -1 if such information is not available or if the user is online.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>user</CODE> - the user to return his information.<DT><B>Returns:</B><DD>the number of milliseconds since the user went offline or -1 if such information is not available or if the user is online.</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>Openfire 3.6.0a Javadoc</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../org/jivesoftware/openfire/PacketRouter.html" title="interface in org.jivesoftware.openfire"><B>PREV CLASS</B></A> <A HREF="../../../org/jivesoftware/openfire/PresenceRouter.html" title="class in org.jivesoftware.openfire"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../index.html?org/jivesoftware/openfire/PresenceManager.html" target="_top"><B>FRAMES</B></A> <A HREF="PresenceManager.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 | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR><i>Copyright © 2003-2008 Jive Software.</i></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -