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

📄 presencemanagerimpl.html

📁 开源软件openfire的API文件。进行openfire的二次开发所必需的工具。
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<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>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html#getPresence(org.jivesoftware.openfire.user.User)">getPresence</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html" title="interface in org.jivesoftware.openfire">PresenceManager</A></CODE></DL></DD><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>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/xmpp/packet/Presence.html" title="class in org.xmpp.packet">Presence</A>&gt; <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>&nbsp;username)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html#getPresences(java.lang.String)">PresenceManager</A></CODE></B></DD><DD>Returns all presences for the user, or <tt>null</tt> if the user is unavailable.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html#getPresences(java.lang.String)">getPresences</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html" title="interface in org.jivesoftware.openfire">PresenceManager</A></CODE></DL></DD><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="getLastPresenceStatus(org.jivesoftware.openfire.user.User)"><!-- --></A><H3>getLastPresenceStatus</H3><PRE>public <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>&nbsp;user)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html#getLastPresenceStatus(org.jivesoftware.openfire.user.User)">PresenceManager</A></CODE></B></DD><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>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html#getLastPresenceStatus(org.jivesoftware.openfire.user.User)">getLastPresenceStatus</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html" title="interface in org.jivesoftware.openfire">PresenceManager</A></CODE></DL></DD><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>public long <B>getLastActivity</B>(<A HREF="../../../../org/jivesoftware/openfire/user/User.html" title="class in org.jivesoftware.openfire.user">User</A>&nbsp;user)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html#getLastActivity(org.jivesoftware.openfire.user.User)">PresenceManager</A></CODE></B></DD><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>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html#getLastActivity(org.jivesoftware.openfire.user.User)">getLastActivity</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html" title="interface in org.jivesoftware.openfire">PresenceManager</A></CODE></DL></DD><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><HR><A NAME="userAvailable(org.xmpp.packet.Presence)"><!-- --></A><H3>userAvailable</H3><PRE>public void <B>userAvailable</B>(<A HREF="../../../../org/xmpp/packet/Presence.html" title="class in org.xmpp.packet">Presence</A>&nbsp;presence)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html#userAvailable(org.xmpp.packet.Presence)">PresenceManager</A></CODE></B></DD><DD>Notification message saying that the sender of the given presence just became available.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html#userAvailable(org.xmpp.packet.Presence)">userAvailable</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html" title="interface in org.jivesoftware.openfire">PresenceManager</A></CODE></DL></DD><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>public void <B>userUnavailable</B>(<A HREF="../../../../org/xmpp/packet/Presence.html" title="class in org.xmpp.packet">Presence</A>&nbsp;presence)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html#userUnavailable(org.xmpp.packet.Presence)">PresenceManager</A></CODE></B></DD><DD>Notification message saying that the sender of the given presence just became unavailable.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html#userUnavailable(org.xmpp.packet.Presence)">userUnavailable</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html" title="interface in org.jivesoftware.openfire">PresenceManager</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>presence</CODE> - the presence sent by the unavailable user.</DL></DD></DL><HR><A NAME="handleProbe(org.xmpp.packet.Presence)"><!-- --></A><H3>handleProbe</H3><PRE>public void <B>handleProbe</B>(<A HREF="../../../../org/xmpp/packet/Presence.html" title="class in org.xmpp.packet">Presence</A>&nbsp;packet)                 throws <A HREF="../../../../org/jivesoftware/openfire/auth/UnauthorizedException.html" title="class in org.jivesoftware.openfire.auth">UnauthorizedException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html#handleProbe(org.xmpp.packet.Presence)">PresenceManager</A></CODE></B></DD><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>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html#handleProbe(org.xmpp.packet.Presence)">handleProbe</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html" title="interface in org.jivesoftware.openfire">PresenceManager</A></CODE></DL></DD><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>public boolean <B>canProbePresence</B>(<A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A>&nbsp;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>&nbsp;probee)                         throws <A HREF="../../../../org/jivesoftware/openfire/user/UserNotFoundException.html" title="class in org.jivesoftware.openfire.user">UserNotFoundException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html#canProbePresence(org.xmpp.packet.JID, java.lang.String)">PresenceManager</A></CODE></B></DD><DD>Returns true if the the prober is allowed to see the presence of the probee.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html#canProbePresence(org.xmpp.packet.JID, java.lang.String)">canProbePresence</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html" title="interface in org.jivesoftware.openfire">PresenceManager</A></CODE></DL></DD><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="probePresence(org.xmpp.packet.JID, org.xmpp.packet.JID)"><!-- --></A><H3>probePresence</H3><PRE>public void <B>probePresence</B>(<A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A>&nbsp;prober,                          <A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A>&nbsp;probee)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html#probePresence(org.xmpp.packet.JID, org.xmpp.packet.JID)">PresenceManager</A></CODE></B></DD><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>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html#probePresence(org.xmpp.packet.JID, org.xmpp.packet.JID)">probePresence</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html" title="interface in org.jivesoftware.openfire">PresenceManager</A></CODE></DL></DD><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="sendUnavailableFromSessions(org.xmpp.packet.JID, org.xmpp.packet.JID)"><!-- --></A><H3>sendUnavailableFromSessions</H3><PRE>public void <B>sendUnavailableFromSessions</B>(<A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A>&nbsp;recipientJID,                                        <A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A>&nbsp;userJID)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html#sendUnavailableFromSessions(org.xmpp.packet.JID, org.xmpp.packet.JID)">PresenceManager</A></CODE></B></DD><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>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html#sendUnavailableFromSessions(org.xmpp.packet.JID, org.xmpp.packet.JID)">sendUnavailableFromSessions</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/PresenceManager.html" title="interface in org.jivesoftware.openfire">PresenceManager</A></CODE></DL>

⌨️ 快捷键说明

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