Smack

org.jivesoftware.smackx.pubsub
Class PublishItem<T extends Item>

java.lang.Object
  extended by org.jivesoftware.smackx.pubsub.NodeExtension
      extended by org.jivesoftware.smackx.pubsub.PublishItem<T>
All Implemented Interfaces:
PacketExtension

public class PublishItem<T extends Item>
extends NodeExtension

Represents a request to publish an item(s) to a specific node.

Author:
Robin Collier

Field Summary
protected  Collection<T> items
           
 
Constructor Summary
PublishItem(String nodeId, Collection<T> toPublish)
          Construct a request to publish multiple items to a node.
PublishItem(String nodeId, T toPublish)
          Construct a request to publish an item to a node.
 
Method Summary
 String toXML()
          Returns the XML representation of the PacketExtension.
 
Methods inherited from class org.jivesoftware.smackx.pubsub.NodeExtension
getElementName, getNamespace, getNode, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

items

protected Collection<T extends Item> items
Constructor Detail

PublishItem

public PublishItem(String nodeId,
                   T toPublish)
Construct a request to publish an item to a node.

Parameters:
nodeId - The node to publish to
toPublish - The Item to publish

PublishItem

public PublishItem(String nodeId,
                   Collection<T> toPublish)
Construct a request to publish multiple items to a node.

Parameters:
nodeId - The node to publish to
toPublish - The list of Item to publish
Method Detail

toXML

public String toXML()
Description copied from interface: PacketExtension
Returns the XML representation of the PacketExtension.

Specified by:
toXML in interface PacketExtension
Overrides:
toXML in class NodeExtension
Returns:
the packet extension as XML.

Smack

Copyright © 2003-2007 Jive Software.