public final class PubSubManager
extends java.lang.Object
| Constructor and Description |
|---|
PubSubManager(org.jivesoftware.smack.XMPPConnection connection)
Create a pubsub manager associated to the specified connection.
|
PubSubManager(org.jivesoftware.smack.XMPPConnection connection,
java.lang.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(java.lang.String id)
Creates a node with default configuration.
|
Node |
createNode(java.lang.String name,
Form config)
Creates a node with specified configuration.
|
void |
deleteNode(java.lang.String nodeId)
Delete the specified node
|
DiscoverItems |
discoverNodes(java.lang.String nodeId)
Get all the nodes that currently exist as a child of the specified
collection node.
|
java.util.List<Affiliation> |
getAffiliations()
Gets the affiliations on the root node.
|
ConfigureForm |
getDefaultConfiguration()
Returns the default settings for Node configuration.
|
<T extends Node> |
getNode(java.lang.String id)
Retrieves the requested node, if it exists.
|
java.util.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(org.jivesoftware.smack.XMPPConnection connection)
connection - The XMPP connectionpublic PubSubManager(org.jivesoftware.smack.XMPPConnection connection,
java.lang.String toAddress)
connection - The XMPP connectiontoAddress - The pubsub specific to address (required for some servers)public LeafNode createNode() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException
org.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionpublic LeafNode createNode(java.lang.String id) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException
id - The id of the node, which must be unique within the
pubsub serviceorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionpublic Node createNode(java.lang.String name, Form config) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException
name - The name of the node, which must be unique within the
pubsub serviceconfig - The configuration for the nodeorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionpublic <T extends Node> T getNode(java.lang.String id) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException
id - - The unique id of the nodeorg.jivesoftware.smack.XMPPException.XMPPErrorException - The node does not existorg.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the server.org.jivesoftware.smack.SmackException.NotConnectedExceptionpublic DiscoverItems discoverNodes(java.lang.String nodeId) throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException
nodeId - - The id of the collection node for which the child
nodes will be returned.DiscoverItems representing the existing nodesorg.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NoResponseException - if there was no response from the server.org.jivesoftware.smack.SmackException.NotConnectedExceptionpublic java.util.List<Subscription> getSubscriptions() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException
org.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionpublic java.util.List<Affiliation> getAffiliations() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException
org.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionpublic void deleteNode(java.lang.String nodeId)
throws org.jivesoftware.smack.SmackException.NoResponseException,
org.jivesoftware.smack.XMPPException.XMPPErrorException,
org.jivesoftware.smack.SmackException.NotConnectedException
nodeId - org.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionpublic ConfigureForm getDefaultConfiguration() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException
org.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.SmackException.NotConnectedExceptionpublic DiscoverInfo getSupportedFeatures() throws org.jivesoftware.smack.SmackException.NoResponseException, org.jivesoftware.smack.XMPPException.XMPPErrorException, org.jivesoftware.smack.SmackException.NotConnectedException
DiscoverInfo instance.org.jivesoftware.smack.XMPPException.XMPPErrorExceptionorg.jivesoftware.smack.SmackException.NoResponseExceptionorg.jivesoftware.smack.SmackException.NotConnectedException