📄 iqrouter.html
字号:
<A NAME="IQRouter()"><!-- --></A><H3>IQRouter</H3><PRE>public <B>IQRouter</B>()</PRE><DL><DD>Creates a packet router.<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="route(org.xmpp.packet.IQ)"><!-- --></A><H3>route</H3><PRE>public void <B>route</B>(<A HREF="../../../org/xmpp/packet/IQ.html" title="class in org.xmpp.packet">IQ</A> packet)</PRE><DL><DD><p>Performs the actual packet routing.</p> <p>You routing is considered 'quick' and implementations may not take excessive amounts of time to complete the routing. If routing will take a long amount of time, the actual routing should be done in another thread so this method returns quickly.</p> <h2>Warning</h2> <p>Be careful to enforce concurrency DbC of concurrent by synchronizing any accesses to class resources.</p><P><DD><DL><DT><B>Parameters:</B><DD><CODE>packet</CODE> - The packet to route<DT><B>Throws:</B><DD><CODE><A HREF="http://java.sun.com/j2se/1.5.0/docs/api/java/lang/NullPointerException.html" title="class or interface in java.lang">NullPointerException</A></CODE> - If the packet is null</DL></DD></DL><HR><A NAME="addHandler(org.jivesoftware.openfire.handler.IQHandler)"><!-- --></A><H3>addHandler</H3><PRE>public void <B>addHandler</B>(<A HREF="../../../org/jivesoftware/openfire/handler/IQHandler.html" title="class in org.jivesoftware.openfire.handler">IQHandler</A> handler)</PRE><DL><DD><p>Adds a new IQHandler to the list of registered handler. The new IQHandler will be responsible for handling IQ packet whose namespace matches the namespace of the IQHandler.</p> An IllegalArgumentException may be thrown if the IQHandler to register was already provided by the server. The server provides a certain list of IQHandlers when the server is started up.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>handler</CODE> - the IQHandler to add to the list of registered handler.</DL></DD></DL><HR><A NAME="removeHandler(org.jivesoftware.openfire.handler.IQHandler)"><!-- --></A><H3>removeHandler</H3><PRE>public void <B>removeHandler</B>(<A HREF="../../../org/jivesoftware/openfire/handler/IQHandler.html" title="class in org.jivesoftware.openfire.handler">IQHandler</A> handler)</PRE><DL><DD><p>Removes an IQHandler from the list of registered handler. The IQHandler to remove was responsible for handling IQ packet whose namespace matches the namespace of the IQHandler.</p> An IllegalArgumentException may be thrown if the IQHandler to remove was already provided by the server. The server provides a certain list of IQHandlers when the server is started up.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>handler</CODE> - the IQHandler to remove from the list of registered handler.</DL></DD></DL><HR><A NAME="addIQResultListener(java.lang.String, org.jivesoftware.openfire.IQResultListener)"><!-- --></A><H3>addIQResultListener</H3><PRE>public void <B>addIQResultListener</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> id, <A HREF="../../../org/jivesoftware/openfire/IQResultListener.html" title="interface in org.jivesoftware.openfire">IQResultListener</A> listener)</PRE><DL><DD>Adds an <A HREF="../../../org/jivesoftware/openfire/IQResultListener.html" title="interface in org.jivesoftware.openfire"><CODE>IQResultListener</CODE></A> that will be invoked when an IQ result is sent to the server itself and is of type result or error. This is a nice way for the server to send IQ packets to other XMPP entities and be waked up when a response is received back.<p> Once an IQ result was received, the listener will be invoked and removed from the list of listeners.<p> If no result was received within one minute, the timeout method of the listener will be invoked and the listener will be removed from the list of listeners.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - the id of the IQ packet being sent from the server to an XMPP entity.<DD><CODE>listener</CODE> - the IQResultListener that will be invoked when an answer is received</DL></DD></DL><HR><A NAME="addIQResultListener(java.lang.String, org.jivesoftware.openfire.IQResultListener, long)"><!-- --></A><H3>addIQResultListener</H3><PRE>public void <B>addIQResultListener</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> id, <A HREF="../../../org/jivesoftware/openfire/IQResultListener.html" title="interface in org.jivesoftware.openfire">IQResultListener</A> listener, long timeoutmillis)</PRE><DL><DD>Adds an <A HREF="../../../org/jivesoftware/openfire/IQResultListener.html" title="interface in org.jivesoftware.openfire"><CODE>IQResultListener</CODE></A> that will be invoked when an IQ result is sent to the server itself and is of type result or error. This is a nice way for the server to send IQ packets to other XMPP entities and be waked up when a response is received back.<p> Once an IQ result was received, the listener will be invoked and removed from the list of listeners.<p> If no result was received within the specified amount of milliseconds, the timeout method of the listener will be invoked and the listener will be removed from the list of listeners.<p> Note that the listener will remain active for <em>at least</em> the specified timeout value. The listener will not be removed at the exact moment it times out. Instead, purging of timed out listeners is a periodic scheduled job.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>id</CODE> - the id of the IQ packet being sent from the server to an XMPP entity.<DD><CODE>listener</CODE> - the IQResultListener that will be invoked when an answer is received.<DD><CODE>timeoutmillis</CODE> - The amount of milliseconds after which waiting for a response should be stopped.</DL></DD></DL><HR><A NAME="initialize(org.jivesoftware.openfire.XMPPServer)"><!-- --></A><H3>initialize</H3><PRE>public void <B>initialize</B>(<A HREF="../../../org/jivesoftware/openfire/XMPPServer.html" title="class in org.jivesoftware.openfire">XMPPServer</A> server)</PRE><DL><DD><B>Description copied from class: <CODE><A HREF="../../../org/jivesoftware/openfire/container/BasicModule.html#initialize(org.jivesoftware.openfire.XMPPServer)">BasicModule</A></CODE></B></DD><DD><p>Initializes the basic module.</p> <p/> <p>Inheriting classes that choose to override this method MUST call this initialize() method before accessing BasicModule resources.</p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../org/jivesoftware/openfire/container/Module.html#initialize(org.jivesoftware.openfire.XMPPServer)">initialize</A></CODE> in interface <CODE><A HREF="../../../org/jivesoftware/openfire/container/Module.html" title="interface in org.jivesoftware.openfire.container">Module</A></CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../org/jivesoftware/openfire/container/BasicModule.html#initialize(org.jivesoftware.openfire.XMPPServer)">initialize</A></CODE> in class <CODE><A HREF="../../../org/jivesoftware/openfire/container/BasicModule.html" title="class in org.jivesoftware.openfire.container">BasicModule</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>server</CODE> - the server hosting this module.</DL></DD></DL><HR><A NAME="routingFailed(org.xmpp.packet.JID, org.xmpp.packet.Packet)"><!-- --></A><H3>routingFailed</H3><PRE>public void <B>routingFailed</B>(<A HREF="../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A> receipient, <A HREF="../../../org/xmpp/packet/Packet.html" title="class in org.xmpp.packet">Packet</A> packet)</PRE><DL><DD>Notification message indicating that a packet has failed to be routed to the receipient.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>receipient</CODE> - address of the entity that failed to receive the packet.<DD><CODE>packet</CODE> - IQ packet that failed to be sent to the receipient.</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/IQResultListener.html" title="interface in org.jivesoftware.openfire"><B>PREV CLASS</B></A> <A HREF="../../../org/jivesoftware/openfire/MessageRouter.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/IQRouter.html" target="_top"><B>FRAMES</B></A> <A HREF="IQRouter.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-2008 Jive Software.</i></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -