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

📄 routingtable.html

📁 开源软件openfire的API文件。进行openfire的二次开发所必需的工具。
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<A NAME="routePacket(org.xmpp.packet.JID, org.xmpp.packet.Packet, boolean)"><!-- --></A><H3>routePacket</H3><PRE>void <B>routePacket</B>(<A HREF="../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A>&nbsp;jid,                 <A HREF="../../../org/xmpp/packet/Packet.html" title="class in org.xmpp.packet">Packet</A>&nbsp;packet,                 boolean&nbsp;fromServer)                 throws <A HREF="../../../org/jivesoftware/openfire/PacketException.html" title="class in org.jivesoftware.openfire">PacketException</A></PRE><DL><DD>Routes a packet to the specified address. The packet destination can be a user on the local server, a component, or a foreign server.<p> When routing a packet to a remote server then a new outgoing connection will be created to the remote server if none was found and the packet will be delivered. If an existing outgoing connection already exists then it will be used for delivering the packet. Moreover, when runing inside of a cluster the node that has the actual outgoing connection will be requested to deliver the requested packet.<p> Packets routed to components will only be sent if the internal or external component is connected to the server. Moreover, when runing inside of a cluster the node that is hosting the component will be requested to deliver the requested packet. It will be first checked if the component is available in this JVM and if not then the first cluster node found hosting the component will be used.<p> Packets routed to users will be delivered if the user is connected to the server. Depending on the packet type and the sender of the packet only available or all user sessions could be considered. For instance, <A HREF="../../../org/xmpp/packet/Message.html" title="class in org.xmpp.packet"><CODE>Messages</CODE></A> and <A HREF="../../../org/xmpp/packet/Presence.html" title="class in org.xmpp.packet"><CODE>Presences</CODE></A> are only sent to available client sessions whilst <A HREF="../../../org/xmpp/packet/IQ.html" title="class in org.xmpp.packet"><CODE>IQs</CODE></A> originated to the server can be sent to available or unavailable sessions. When runing inside of a cluster the node that is hosting the user session will be requested to deliver the requested packet.<p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>jid</CODE> - the receipient of the packet to route.<DD><CODE>packet</CODE> - the packet to route.<DD><CODE>fromServer</CODE> - true if the packet was created by the server. This packets should        always be delivered<DT><B>Throws:</B><DD><CODE><A HREF="../../../org/jivesoftware/openfire/PacketException.html" title="class in org.jivesoftware.openfire">PacketException</A></CODE> - thrown if the packet is malformed (results in the sender's      session being shutdown).</DL></DD></DL><HR><A NAME="hasClientRoute(org.xmpp.packet.JID)"><!-- --></A><H3>hasClientRoute</H3><PRE>boolean <B>hasClientRoute</B>(<A HREF="../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A>&nbsp;jid)</PRE><DL><DD>Returns true if a registered user or anonymous user with the specified full JID is currently logged. When running inside of a cluster a true value will be returned as long as the user is connected to any cluster node. // TODO Should we care about available or not available????<P><DD><DL><DT><B>Parameters:</B><DD><CODE>jid</CODE> - the full JID of the user.<DT><B>Returns:</B><DD>true if a registered user or anonymous user with the specified full JID is currently logged.</DL></DD></DL><HR><A NAME="isAnonymousRoute(org.xmpp.packet.JID)"><!-- --></A><H3>isAnonymousRoute</H3><PRE>boolean <B>isAnonymousRoute</B>(<A HREF="../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A>&nbsp;jid)</PRE><DL><DD>Returns true if an anonymous user with the specified full JID is currently logged. When running inside of a cluster a true value will be returned as long as the user is connected to any cluster node.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>jid</CODE> - the full JID of the anonymous user.<DT><B>Returns:</B><DD>true if an anonymous user with the specified full JID is currently logged.</DL></DD></DL><HR><A NAME="isLocalRoute(org.xmpp.packet.JID)"><!-- --></A><H3>isLocalRoute</H3><PRE>boolean <B>isLocalRoute</B>(<A HREF="../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A>&nbsp;jid)</PRE><DL><DD>Returns true if the specified address belongs to a route that is hosted by this JVM. When running inside of a cluster each cluster node will host routes to local resources. A false value could either mean that the route is not hosted by this JVM but other cluster node or that there is no route to the specified address. Use <A HREF="../../../org/jivesoftware/openfire/XMPPServer.html#isLocal(org.xmpp.packet.JID)"><CODE>XMPPServer.isLocal(org.xmpp.packet.JID)</CODE></A> to figure out if the address belongs to tge domain hosted by this server.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>jid</CODE> - the address of the route.<DT><B>Returns:</B><DD>true if the specified address belongs to a route that is hosted by this JVM.</DL></DD></DL><HR><A NAME="hasServerRoute(org.xmpp.packet.JID)"><!-- --></A><H3>hasServerRoute</H3><PRE>boolean <B>hasServerRoute</B>(<A HREF="../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A>&nbsp;jid)</PRE><DL><DD>Returns true if an outgoing server session exists to the specified remote server. The JID can be a full JID or a bare JID since only the domain of the specified address will be used to look up the route.<p> When running inside of a cluster the look up will be done in all the cluster. So as long as a node has a connection to the remote server a true value will be returned.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>jid</CODE> - JID that specifies the remote server address.<DT><B>Returns:</B><DD>true if an outgoing server session exists to the specified remote server.</DL></DD></DL><HR><A NAME="hasComponentRoute(org.xmpp.packet.JID)"><!-- --></A><H3>hasComponentRoute</H3><PRE>boolean <B>hasComponentRoute</B>(<A HREF="../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A>&nbsp;jid)</PRE><DL><DD>Returns true if an internal or external component is hosting the specified address. The JID can be a full JID or a bare JID since only the domain of the specified address will be used to look up the route.<p> When running inside of a cluster the look up will be done in all the cluster. So as long as a node is hosting the component  a true value will be returned.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>jid</CODE> - JID that specifies the component address.<DT><B>Returns:</B><DD>true if an internal or external component is hosting the specified address.</DL></DD></DL><HR><A NAME="getClientRoute(org.xmpp.packet.JID)"><!-- --></A><H3>getClientRoute</H3><PRE><A HREF="../../../org/jivesoftware/openfire/session/ClientSession.html" title="interface in org.jivesoftware.openfire.session">ClientSession</A> <B>getClientRoute</B>(<A HREF="../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A>&nbsp;jid)</PRE><DL><DD>Returns the client session associated to the specified XMPP address or <tt>null</tt> if none was found. When running inside of a cluster and a remote node is hosting the client session then a session surrage will be returned.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>jid</CODE> - the address of the session.<DT><B>Returns:</B><DD>the client session associated to the specified XMPP address or null if none was found.</DL></DD></DL><HR><A NAME="getClientsRoutes(boolean)"><!-- --></A><H3>getClientsRoutes</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>&lt;<A HREF="../../../org/jivesoftware/openfire/session/ClientSession.html" title="interface in org.jivesoftware.openfire.session">ClientSession</A>&gt; <B>getClientsRoutes</B>(boolean&nbsp;onlyLocal)</PRE><DL><DD>Returns collection of client sessions authenticated with the server. When running inside of a cluster the returned sessions will include sessions connected to this JVM and also other cluster nodes. TODO Prevent usage of this message and change original requirement to avoid having to load all sessions. TODO This may not scale when hosting millions of sessions.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>onlyLocal</CODE> - true if only client sessions connected to this JVM must be considered.<DT><B>Returns:</B><DD>collection of client sessions authenticated with the server.</DL></DD></DL><HR><A NAME="getServerRoute(org.xmpp.packet.JID)"><!-- --></A><H3>getServerRoute</H3><PRE><A HREF="../../../org/jivesoftware/openfire/session/OutgoingServerSession.html" title="interface in org.jivesoftware.openfire.session">OutgoingServerSession</A> <B>getServerRoute</B>(<A HREF="../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A>&nbsp;jid)</PRE><DL><DD>Returns the outgoing server session associated to the specified XMPP address or <tt>null</tt> if none was found. When running inside of a cluster and a remote node is hosting the session then a session surrage will be returned.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>jid</CODE> - the address of the session.<DT><B>Returns:</B><DD>the outgoing server session associated to the specified XMPP address or null if none was found.</DL></DD></DL><HR><A NAME="getServerHostnames()"><!-- --></A><H3>getServerHostnames</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>&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; <B>getServerHostnames</B>()</PRE><DL><DD>Returns a collection with the hostnames of the remote servers that currently may receive packets sent from this server.<P><DD><DL><DT><B>Returns:</B><DD>a collection with the hostnames of the remote servers that currently may receive         packets sent from this server.</DL></DD></DL><HR><A NAME="getServerSessionsCount()"><!-- --></A><H3>getServerSessionsCount</H3><PRE>int <B>getServerSessionsCount</B>()</PRE><DL><DD>Returns the number of outgoing server sessions hosted in this JVM. When runing inside of a cluster you will need to get this value for each cluster node to learn the total number of outgoing server sessions.<P><DD><DL>

⌨️ 快捷键说明

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