📄 internalcomponentmanager.html
字号:
<p/> <p>Inheriting classes that choose to override this method MUST call this stop() method before accessing BasicModule resources.</p><P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/jivesoftware/openfire/container/Module.html#stop()">stop</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#stop()">stop</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></DL></DD></DL><HR><A NAME="addComponent(java.lang.String, org.xmpp.component.Component)"><!-- --></A><H3>addComponent</H3><PRE>public void <B>addComponent</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> subdomain, <A HREF="../../../../org/xmpp/component/Component.html" title="interface in org.xmpp.component">Component</A> component) throws <A HREF="../../../../org/xmpp/component/ComponentException.html" title="class in org.xmpp.component">ComponentException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/xmpp/component/ComponentManager.html#addComponent(java.lang.String, org.xmpp.component.Component)">ComponentManager</A></CODE></B></DD><DD>Adds a component. The <A HREF="../../../../org/xmpp/component/Component.html#initialize(org.xmpp.packet.JID, org.xmpp.component.ComponentManager)"><CODE>Component.initialize(org.xmpp.packet.JID, ComponentManager)</CODE></A> method will be called on the component. The subdomain specifies the address of the component on a server. For example, if the subdomain is "test" and the XMPP server is at "example.com", then the component's address would be "test.example.com".<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/xmpp/component/ComponentManager.html#addComponent(java.lang.String, org.xmpp.component.Component)">addComponent</A></CODE> in interface <CODE><A HREF="../../../../org/xmpp/component/ComponentManager.html" title="interface in org.xmpp.component">ComponentManager</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>subdomain</CODE> - the subdomain of the component's address.<DD><CODE>component</CODE> - the component.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/xmpp/component/ComponentException.html" title="class in org.xmpp.component">ComponentException</A></CODE></DL></DD></DL><HR><A NAME="removeComponent(java.lang.String)"><!-- --></A><H3>removeComponent</H3><PRE>public void <B>removeComponent</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> subdomain)</PRE><DL><DD>Removes a component. The <A HREF="../../../../org/xmpp/component/Component.html#shutdown()"><CODE>Component.shutdown()</CODE></A> method will be called on the component. Note that if the component was an external component that was connected several times then all its connections will be terminated.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/xmpp/component/ComponentManager.html#removeComponent(java.lang.String)">removeComponent</A></CODE> in interface <CODE><A HREF="../../../../org/xmpp/component/ComponentManager.html" title="interface in org.xmpp.component">ComponentManager</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>subdomain</CODE> - the subdomain of the component's address.</DL></DD></DL><HR><A NAME="removeComponent(java.lang.String, org.xmpp.component.Component)"><!-- --></A><H3>removeComponent</H3><PRE>public void <B>removeComponent</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> subdomain, <A HREF="../../../../org/xmpp/component/Component.html" title="interface in org.xmpp.component">Component</A> component)</PRE><DL><DD>Removes a given component. Unlike <A HREF="../../../../org/jivesoftware/openfire/component/InternalComponentManager.html#removeComponent(java.lang.String)"><CODE>removeComponent(String)</CODE></A> this method will just remove a single component instead of all components associated to the subdomain. External components may connect several times and register for the same subdomain. This method just removes a singled connection not all of them.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>subdomain</CODE> - the subdomain of the component's address.<DD><CODE>component</CODE> - specific component to remove.</DL></DD></DL><HR><A NAME="sendPacket(org.xmpp.component.Component, org.xmpp.packet.Packet)"><!-- --></A><H3>sendPacket</H3><PRE>public void <B>sendPacket</B>(<A HREF="../../../../org/xmpp/component/Component.html" title="interface in org.xmpp.component">Component</A> component, <A HREF="../../../../org/xmpp/packet/Packet.html" title="class in org.xmpp.packet">Packet</A> packet)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/xmpp/component/ComponentManager.html#sendPacket(org.xmpp.component.Component, org.xmpp.packet.Packet)">ComponentManager</A></CODE></B></DD><DD>Sends a packet to the XMPP server. The "from" value of the packet must not be null. An <tt>IllegalArgumentException</tt> will be thrown when the "from" value is null.<p> Components are trusted by the server and may use any value in from address. Usually the from address uses the component's address as the domain but this is not required.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/xmpp/component/ComponentManager.html#sendPacket(org.xmpp.component.Component, org.xmpp.packet.Packet)">sendPacket</A></CODE> in interface <CODE><A HREF="../../../../org/xmpp/component/ComponentManager.html" title="interface in org.xmpp.component">ComponentManager</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>component</CODE> - the component sending the packet.<DD><CODE>packet</CODE> - the packet to send.</DL></DD></DL><HR><A NAME="query(org.xmpp.component.Component, org.xmpp.packet.IQ, int)"><!-- --></A><H3>query</H3><PRE>public <A HREF="../../../../org/xmpp/packet/IQ.html" title="class in org.xmpp.packet">IQ</A> <B>query</B>(<A HREF="../../../../org/xmpp/component/Component.html" title="interface in org.xmpp.component">Component</A> component, <A HREF="../../../../org/xmpp/packet/IQ.html" title="class in org.xmpp.packet">IQ</A> packet, int timeout) throws <A HREF="../../../../org/xmpp/component/ComponentException.html" title="class in org.xmpp.component">ComponentException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/xmpp/component/ComponentManager.html#query(org.xmpp.component.Component, org.xmpp.packet.IQ, int)">ComponentManager</A></CODE></B></DD><DD>Sends an IQ packet to the XMPP server and waits to get an IQ of type result or error. The "from" value of the packet must not be null. An <tt>IllegalArgumentException</tt> will be thrown when the "from" value is null.<p> Components are trusted by the server and may use any value in from address. Usually the from address uses the component's address as the domain but this is not required.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/xmpp/component/ComponentManager.html#query(org.xmpp.component.Component, org.xmpp.packet.IQ, int)">query</A></CODE> in interface <CODE><A HREF="../../../../org/xmpp/component/ComponentManager.html" title="interface in org.xmpp.component">ComponentManager</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>component</CODE> - the component sending the packet.<DD><CODE>packet</CODE> - the IQ packet to send.<DD><CODE>timeout</CODE> - the number of milliseconds to wait before returning an IQ error.<DT><B>Returns:</B><DD>the answer sent by the server. The answer could be an IQ of type result or error or null if nothing was received.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/xmpp/component/ComponentException.html" title="class in org.xmpp.component">ComponentException</A></CODE></DL></DD></DL><HR><A NAME="query(org.xmpp.component.Component, org.xmpp.packet.IQ, org.jivesoftware.openfire.IQResultListener)"><!-- --></A><H3>query</H3><PRE>public void <B>query</B>(<A HREF="../../../../org/xmpp/component/Component.html" title="interface in org.xmpp.component">Component</A> component, <A HREF="../../../../org/xmpp/packet/IQ.html" title="class in org.xmpp.packet">IQ</A> packet, <A HREF="../../../../org/jivesoftware/openfire/IQResultListener.html" title="interface in org.jivesoftware.openfire">IQResultListener</A> listener) throws <A HREF="../../../../org/xmpp/component/ComponentException.html" title="class in org.xmpp.component">ComponentException</A></PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/xmpp/component/ComponentManager.html#query(org.xmpp.component.Component, org.xmpp.packet.IQ, org.jivesoftware.openfire.IQResultListener)">ComponentManager</A></CODE></B></DD><DD>Sends an IQ packet to the server and returns immediately. The specified IQResultListener will be invoked when an answer is received.<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/xmpp/component/ComponentManager.html#query(org.xmpp.component.Component, org.xmpp.packet.IQ, org.jivesoftware.openfire.IQResultListener)">query</A></CODE> in interface <CODE><A HREF="../../../../org/xmpp/component/ComponentManager.html" title="interface in org.xmpp.component">ComponentManager</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>component</CODE> - the component sending the packet.<DD><CODE>packet</CODE> - the IQ packet to send.<DD><CODE>listener</CODE> - the listener that will be invoked when an answer is received.<DT><B>Throws:</B><DD><CODE><A HREF="../../../../org/xmpp/component/ComponentException.html" title="class in org.xmpp.component">ComponentException</A></CODE></DL></DD></DL><HR><A NAME="addListener(org.jivesoftware.openfire.component.ComponentEventListener)"><!-- --></A><H3>addListener</H3><PRE>public void <B>addListener</B>(<A HREF="../../../../org/jivesoftware/openfire/component/ComponentEventListener.html" title="interface in org.jivesoftware.openfire.component">ComponentEventListener</A> listener)</PRE><DL><DD>Adds a new listener that will be notified of component events. Events being notified are: 1) when a component is added to the component manager, 2) when a component is deleted and 3) when disco#info is received from a component.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the new listener to notify of component events.</DL></DD></DL><HR><A NAME="removeListener(org.jivesoftware.openfire.component.ComponentEventListener)"><!-- --></A><H3>removeListener</H3><PRE>public void <B>removeListener</B>(<A HREF="../../../../org/jivesoftware/openfire/component/ComponentEventListener.html" title="interface in org.jivesoftware.openfire.component">ComponentEventListener</A> listener)</PRE><DL><DD>Removes the specified listener from the listeners being notified of component events.<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>listener</CODE> - the listener to remove.</DL></DD></DL><HR><A NAME="getProperty(java.lang.String)"><!-- --></A><H3>getProperty</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>getProperty</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> name)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/xmpp/component/ComponentManager.html#getProperty(java.lang.String)">ComponentManager</A></CODE></B></DD><DD>Returns a property value specified by name. Properties can be used by components to store configuration data. It is recommended that each component qualify property names to prevent overlap. For example a component that broadcasts messages to groups of users, might prepend all property names it uses with "broadcast.".<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/xmpp/component/ComponentManager.html#getProperty(java.lang.String)">getProperty</A></CODE> in interface <CODE><A HREF="../../../../org/xmpp/component/ComponentManager.html" title="interface in org.xmpp.component">ComponentManager</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - the property name.<DT><B>Returns:</B><DD>the property value.</DL></DD></DL><HR><A NAME="setProperty(java.lang.String, java.lang.String)"><!-- --></A><H3>setProperty</H3><PRE>public void <B>setProperty</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> name, <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> value)</PRE><DL><DD><B>Description copied from interface: <CODE><A HREF="../../../../org/xmpp/component/ComponentManager.html#setProperty(java.lang.String, java.lang.String)">ComponentManager</A></CODE></B></DD><DD>Sets a property value. Properties can be used by components to store configuration data. It is recommended that each component qualify property names to prevent overlap. For example a component that broadcasts messages to groups of users, might prepend all property names it uses with "broadcast.".<P><DD><DL><DT><B>Specified by:</B><DD><CODE><A HREF="../../../../org/xmpp/component/ComponentManager.html#setProperty(java.lang.String, java.lang.String)">setProperty</A></CODE> in interface <CODE><A HREF="../../../../org/xmpp/component/ComponentManager.html" title="interface in org.xmpp.component">ComponentManager</A></CODE></DL></DD>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -