public final class PubSubService
extends java.lang.Object
This class acts a facade to deal with a remote pubsub service.
E.g. it lets you get all your subscriptions on the service, let’s you work with nodes (e.g. subscribe to nodes) or let’s you discover the features provided by the remote service.
To work with pubsub nodes, create a local node instance, which can be used to work the remote node (e.g. subscribe to the node).
Modifier and Type | Method and Description |
---|---|
AsyncResult<java.util.Collection<PubSubFeature>> |
discoverFeatures()
Discovers the features, which are supported by the pubsub service.
|
AsyncResult<java.util.List<PubSubNode>> |
discoverNodes()
Discovers the first-level nodes of this pubsub service.
|
Jid |
getAddress()
Gets the service address.
|
AsyncResult<java.util.List<Affiliation>> |
getAffiliations()
Gets the affiliations for all nodes.
|
AsyncResult<DataForm> |
getDefaultNodeConfiguration()
Gets the default node configuration form for this pubsub service.
|
AsyncResult<DataForm> |
getDefaultSubscriptionOptions()
Gets the default subscription options for this pubsub service.
|
java.lang.String |
getName()
Gets the name of this service.
|
AsyncResult<java.util.List<Subscription>> |
getSubscriptions()
Gets the subscriptions for all nodes.
|
PubSubNode |
node(java.lang.String node)
Creates a pubsub node locally, which can be used to work with a node at the pubsub service.
|
java.lang.String |
toString()
Returns the service address.
|
public AsyncResult<java.util.Collection<PubSubFeature>> discoverFeatures()
Discovers the features, which are supported by the pubsub service.
public AsyncResult<java.util.List<PubSubNode>> discoverNodes()
Discovers the first-level nodes of this pubsub service.
public PubSubNode node(java.lang.String node)
Creates a pubsub node locally, which can be used to work with a node at the pubsub service.
node
- The node.public AsyncResult<java.util.List<Subscription>> getSubscriptions()
Gets the subscriptions for all nodes.
public AsyncResult<java.util.List<Affiliation>> getAffiliations()
Gets the affiliations for all nodes.
public AsyncResult<DataForm> getDefaultSubscriptionOptions()
Gets the default subscription options for this pubsub service.
public AsyncResult<DataForm> getDefaultNodeConfiguration()
Gets the default node configuration form for this pubsub service.
public Jid getAddress()
Gets the service address.
public java.lang.String toString()
Returns the service address.
toString
in class java.lang.Object
public java.lang.String getName()
Gets the name of this service.
Copyright © 2014–2019 XMPP.rocks. All rights reserved.