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:
parent
1ed6ab1e40
commit
7f8756d5a0
1 changed files with 16 additions and 11 deletions
|
@ -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 <x> 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>
|
||||||
* <?xml version="1.0"?>
|
* <?xml version="1.0"?>
|
||||||
* <smackProviders>
|
* <smackProviders>
|
||||||
* <xProvider namespace="jabber:iq:event"
|
* <extensionProvider>
|
||||||
* className="org.jivesoftware.smack.packet.MessageEvent"/>
|
* <elementName>x</elementName>
|
||||||
|
* <namespace>jabber:iq:event</namespace>
|
||||||
|
* <className>org.jivesoftware.smack.packet.MessageEvent</className>
|
||||||
|
* </extensionProvider>
|
||||||
* </smackProviders></pre>
|
* </smackProviders></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 <x> 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
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue