public final class PubSubManager extends Object
LeafNode
instances. These
instances provide the bulk of the functionality as defined in the
pubsub specification XEP-0060.Constructor and Description |
---|
PubSubManager(Connection connection)
Create a pubsub manager associated to the specified connection.
|
PubSubManager(Connection connection,
String toAddress)
Create a pubsub manager associated to the specified connection where
the pubsub requests require a specific to address for packets.
|
Modifier and Type | Method and Description |
---|---|
LeafNode |
createNode()
Creates an instant node, if supported.
|
LeafNode |
createNode(String id)
Creates a node with default configuration.
|
Node |
createNode(String name,
Form config)
Creates a node with specified configuration.
|
void |
deleteNode(String nodeId)
Delete the specified node
|
DiscoverItems |
discoverNodes(String nodeId)
Get all the nodes that currently exist as a child of the specified
collection node.
|
List<Affiliation> |
getAffiliations()
Gets the affiliations on the root node.
|
ConfigureForm |
getDefaultConfiguration()
Returns the default settings for Node configuration.
|
Node |
getNode(String id)
Retrieves the requested node, if it exists.
|
List<Subscription> |
getSubscriptions()
Gets the subscriptions on the root node.
|
DiscoverInfo |
getSupportedFeatures()
Gets the supported features of the servers pubsub implementation
as a standard
DiscoverInfo instance. |
public PubSubManager(Connection connection)
connection
- The XMPP connectionpublic PubSubManager(Connection connection, String toAddress)
connection
- The XMPP connectiontoAddress
- The pubsub specific to address (required for some servers)public LeafNode createNode() throws XMPPException
XMPPException
public LeafNode createNode(String id) throws XMPPException
id
- The id of the node, which must be unique within the
pubsub serviceXMPPException
public Node createNode(String name, Form config) throws XMPPException
name
- The name of the node, which must be unique within the
pubsub serviceconfig
- The configuration for the nodeXMPPException
public Node getNode(String id) throws XMPPException
id
- - The unique id of the nodeXMPPException
- The node does not existpublic DiscoverItems discoverNodes(String nodeId) throws XMPPException
nodeId
- - The id of the collection node for which the child
nodes will be returned.DiscoverItems
representing the existing nodesXMPPException
public List<Subscription> getSubscriptions() throws XMPPException
XMPPException
public List<Affiliation> getAffiliations() throws XMPPException
XMPPException
public void deleteNode(String nodeId) throws XMPPException
nodeId
- XMPPException
public ConfigureForm getDefaultConfiguration() throws XMPPException
XMPPException
public DiscoverInfo getSupportedFeatures() throws XMPPException
DiscoverInfo
instance.XMPPException
Copyright © 2003-2007 Jive Software.