📄 packetcopier.html
字号:
<A NAME="getInstance()"><!-- --></A><H3>getInstance</H3><PRE>public static <A HREF="../../../../org/jivesoftware/openfire/interceptor/PacketCopier.html" title="class in org.jivesoftware.openfire.interceptor">PacketCopier</A> <B>getInstance</B>()</PRE><DL><DD>Returns unique instance of this class.<P><DD><DL></DL></DD><DD><DL><DT><B>Returns:</B><DD>unique instance of this class.</DL></DD></DL><HR><A NAME="addSubscriber(org.xmpp.packet.JID, boolean, boolean, boolean, boolean, boolean)"><!-- --></A><H3>addSubscriber</H3><PRE>public void <B>addSubscriber</B>(<A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A> componentJID, boolean iqEnabled, boolean messageEnabled, boolean presenceEnabled, boolean incoming, boolean processed)</PRE><DL><DD>Creates new subscription for the specified component with the specified settings.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>componentJID</CODE> - the address of the component connected to the server.<DD><CODE>iqEnabled</CODE> - true if interested in IQ packets of any type.<DD><CODE>messageEnabled</CODE> - true if interested in Message packets.<DD><CODE>presenceEnabled</CODE> - true if interested in Presence packets.<DD><CODE>incoming</CODE> - true if interested in incoming traffic. false means outgoing.<DD><CODE>processed</CODE> - true if want to be notified after packets were processed.</DL></DD></DL><HR><A NAME="removeSubscriber(org.xmpp.packet.JID)"><!-- --></A><H3>removeSubscriber</H3><PRE>public void <B>removeSubscriber</B>(<A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A> componentJID)</PRE><DL><DD>Removes the subscription of the specified component.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>componentJID</CODE> - the address of the component connected to the server.</DL></DD></DL><HR><A NAME="interceptPacket(org.xmpp.packet.Packet, org.jivesoftware.openfire.session.Session, boolean, boolean)"><!-- --></A><H3>interceptPacket</H3><PRE>public void <B>interceptPacket</B>(<A HREF="../../../../org/xmpp/packet/Packet.html" title="class in org.xmpp.packet">Packet</A> packet, <A HREF="../../../../org/jivesoftware/openfire/session/Session.html" title="interface in org.jivesoftware.openfire.session">Session</A> session, boolean incoming, boolean processed) throws <A HREF="../../../../org/jivesoftware/openfire/interceptor/PacketRejectedException.html" title="class in org.jivesoftware.openfire.interceptor">PacketRejectedException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/interceptor/PacketInterceptor.html#interceptPacket(org.xmpp.packet.Packet, org.jivesoftware.openfire.session.Session, boolean, boolean)">PacketInterceptor</A></CODE></B></DD><DD>Invokes the interceptor on the specified packet. The interceptor can either modify the packet, or throw a PacketRejectedException to block it from being sent or processed (when read).<p> An exception can only be thrown when <tt>processed</tt> is false which means that the read packet has not been processed yet or the packet was not sent yet. If the exception is thrown with a "read" packet then the sender of the packet will receive an answer with an error. But if the exception is thrown with a "sent" packet then nothing will happen.<p> Note that for each packet, every interceptor will be called twice: once before processing is complete (<tt>processing==true</tt>) and once after processing is complete. Typically, an interceptor will want to ignore one or the other case.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/interceptor/PacketInterceptor.html#interceptPacket(org.xmpp.packet.Packet, org.jivesoftware.openfire.session.Session, boolean, boolean)">interceptPacket</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/interceptor/PacketInterceptor.html" title="interface in org.jivesoftware.openfire.interceptor">PacketInterceptor</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>packet</CODE> - the packet to take action on.<DD><CODE>session</CODE> - the session that received or is sending the packet.<DD><CODE>incoming</CODE> - flag that indicates if the packet was read by the server or sent from the server.<DD><CODE>processed</CODE> - flag that indicates if the action (read/send) was performed. (PRE vs. POST).<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/interceptor/PacketRejectedException.html" title="class in org.jivesoftware.openfire.interceptor">PacketRejectedException</A></CODE> - if the packet should be prevented from being processed.</DL></DD></DL><HR><A NAME="componentInfoReceived(org.xmpp.packet.IQ)"><!-- --></A><H3>componentInfoReceived</H3><PRE>public void <B>componentInfoReceived</B>(<A HREF="../../../../org/xmpp/packet/IQ.html" title="class in org.xmpp.packet">IQ</A> iq)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/component/ComponentEventListener.html#componentInfoReceived(org.xmpp.packet.IQ)">ComponentEventListener</A></CODE></B></DD><DD>The server has received a disco#info response from the component. Once a component is registered with the server, the server will send a disco#info request to the component to discover if service discover is supported by the component. This event is triggered when the server received the response of the component.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/component/ComponentEventListener.html#componentInfoReceived(org.xmpp.packet.IQ)">componentInfoReceived</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/component/ComponentEventListener.html" title="interface in org.jivesoftware.openfire.component">ComponentEventListener</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>iq</CODE> - the IQ packet with the disco#info sent by the component.</DL></DD></DL><HR><A NAME="componentRegistered(org.xmpp.packet.JID)"><!-- --></A><H3>componentRegistered</H3><PRE>public void <B>componentRegistered</B>(<A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A> componentJID)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/component/ComponentEventListener.html#componentRegistered(org.xmpp.packet.JID)">ComponentEventListener</A></CODE></B></DD><DD>A component was registered with the Component Manager. At this point the component has been intialized and started. XMPP entities can exchange packets with the component. However, the component is still not listed as a disco#items of the server since the component has not answered the disco#info request sent by the server.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/component/ComponentEventListener.html#componentRegistered(org.xmpp.packet.JID)">componentRegistered</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/component/ComponentEventListener.html" title="interface in org.jivesoftware.openfire.component">ComponentEventListener</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>componentJID</CODE> - address where the component can be located (e.g. search.myserver.com)</DL></DD></DL><HR><A NAME="componentUnregistered(org.xmpp.packet.JID)"><!-- --></A><H3>componentUnregistered</H3><PRE>public void <B>componentUnregistered</B>(<A HREF="../../../../org/xmpp/packet/JID.html" title="class in org.xmpp.packet">JID</A> componentJID)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/jivesoftware/openfire/component/ComponentEventListener.html#componentUnregistered(org.xmpp.packet.JID)">ComponentEventListener</A></CODE></B></DD><DD>A component was removed. This means that no other cluster node has this component and this was the last connection of the component.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/component/ComponentEventListener.html#componentUnregistered(org.xmpp.packet.JID)">componentUnregistered</A></CODE> in interface <CODE><A HREF="../../../../org/jivesoftware/openfire/component/ComponentEventListener.html" title="interface in org.jivesoftware.openfire.component">ComponentEventListener</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>componentJID</CODE> - address where the component was located (e.g. search.myserver.com)</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/interceptor/InterceptorManager.html" title="class in org.jivesoftware.openfire.interceptor"><B>PREV CLASS</B></A> <A HREF="../../../../org/jivesoftware/openfire/interceptor/PacketInterceptor.html" title="interface in org.jivesoftware.openfire.interceptor"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../index.html?org/jivesoftware/openfire/interceptor/PacketCopier.html" target="_top"><B>FRAMES</B></A> <A HREF="PacketCopier.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 | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | 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 + -