Smack

org.jivesoftware.smackx.pubsub.provider
Class ItemProvider

java.lang.Object
  extended by org.jivesoftware.smackx.pubsub.provider.ItemProvider
All Implemented Interfaces:
PacketExtensionProvider

public class ItemProvider
extends java.lang.Object
implements PacketExtensionProvider

Parses an item element as is defined in both the PubSubNamespace.BASIC and PubSubNamespace.EVENT namespaces. To parse the item contents, it will use whatever PacketExtensionProvider is registered in smack.providers for its element name and namespace. If no provider is registered, it will return a SimplePayload.

Author:
Robin Collier

Constructor Summary
ItemProvider()
           
 
Method Summary
 PacketExtension parseExtension(org.xmlpull.v1.XmlPullParser parser)
          Parse an extension sub-packet and create a PacketExtension instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ItemProvider

public ItemProvider()
Method Detail

parseExtension

public PacketExtension parseExtension(org.xmlpull.v1.XmlPullParser parser)
                               throws java.lang.Exception
Description copied from interface: PacketExtensionProvider
Parse an extension sub-packet and create a PacketExtension instance. At the beginning of the method call, the xml parser will be positioned on the opening element of the packet extension. At the end of the method call, the parser must be positioned on the closing element of the packet extension.

Specified by:
parseExtension in interface PacketExtensionProvider
Parameters:
parser - an XML parser.
Returns:
a new IQ instance.
Throws:
java.lang.Exception - if an error occurs parsing the XML.

Smack

Copyright © 2003-2007 Jive Software.