1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-11-22 22:32:06 +01:00

Fixed Javadocs for extension providers.

git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1944 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
Matt Tucker 2003-05-20 20:23:15 +00:00 committed by mtucker
parent 1ed6ab1e40
commit 7f8756d5a0

View file

@ -111,25 +111,30 @@ import java.net.URL;
* value from the XML into a boolean, int, long, float, double, or Class depending on the * value from the XML into a boolean, int, long, float, double, or Class depending on the
* type the IQ instance expects.<p> * type the IQ instance expects.<p>
* *
* A pluggable system for the &lt;x&gt; portion of packets also exists. Each x provider * A pluggable system for packet extensions, child elements in a custom namespace for
* message and presence packets, also exists. Each extension provider
* is registered with a name space in the smack.providers file as in the following example: * is registered with a name space in the smack.providers file as in the following example:
* *
* <pre> * <pre>
* &lt;?xml version="1.0"?&gt; * &lt;?xml version="1.0"?&gt;
* &lt;smackProviders&gt; * &lt;smackProviders&gt;
* &lt;xProvider namespace="jabber:iq:event" * &lt;extensionProvider&gt;
* className="org.jivesoftware.smack.packet.MessageEvent"/&gt; * &lt;elementName&gt;x&lt;/elementName&gt;
* &lt;namespace&gt;jabber:iq:event&lt;/namespace&gt;
* &lt;className&gt;org.jivesoftware.smack.packet.MessageEvent&lt/className&gt;
* &lt;/extensionProvider&gt;
* &lt;/smackProviders&gt;</pre> * &lt;/smackProviders&gt;</pre>
* *
* If multiple provider entries attempt to register to handle the same namespace, the * If multiple provider entries attempt to register to handle the same element name and namespace,
* first entry loaded from the classpath will take precedence. Whenever an &lt;x&gt; element * the first entry loaded from the classpath will take precedence. Whenever a packet extension
* is found in a packet, parsing will be passed to the correct provider. Each provider * is found in a packet, parsing will be passed to the correct provider. Each provider
* can either implement the XProvider or be a standard Java Bean. In the former case, * can either implement the PacketExtensionProvider interface or be a standard Java Bean. In
* each XProvider is responsible for parsing the raw XML stream to contruct an object. * the former case, each extension provider is responsible for parsing the raw XML stream to
* In the latter case, bean introspection is used to try to automatically set the * contruct an object. In the latter case, bean introspection is used to try to automatically
* properties of the class using the values in the x sub-element. When a XProvider is * set the properties of the class using the values in the packet extension sub-element. When an
* not registered for a namespace, Smack will store all top-level elements of the sub-packet * extension provider is not registered for an element name and namespace combination, Smack will
* in a Map and attach it to the packet. * store all top-level elements of the sub-packet in DefaultPacketExtension object and then
* attach it to the packet.
* *
* @author Matt Tucker * @author Matt Tucker
*/ */