public final class PubSubNode extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PubSubNode.Type
The node type.
|
| Modifier and Type | Method and Description |
|---|---|
String |
create()
Creates a node.
|
String |
create(rocks.xmpp.extensions.data.model.DataForm dataForm)
Creates and configures this node.
|
void |
delete()
Deletes a node on the pubsub service.
|
void |
delete(URI uri)
Deletes this node and specifies a replacement node.
|
List<Item> |
discoverItems()
Gets the items for this node.
|
List<Affiliation> |
getAffiliations()
Gets the affiliations for this node.
|
rocks.xmpp.extensions.data.model.DataForm |
getDefaultSubscriptionOptions()
Gets the default subscription options for a specific node.
|
String |
getId()
Gets the node id.
|
List<Item> |
getItems()
Gets all items for this node.
|
List<Item> |
getItems(int maxItems)
Gets the most recent items.
|
List<Item> |
getItems(String... ids)
Gets one or more items with a given item id for a specific node.
|
String |
getName()
Gets the name.
|
rocks.xmpp.extensions.data.model.DataForm |
getNodeConfiguration()
Gets the node configuration form.
|
NodeInfo |
getNodeInfo()
Gets node info.
|
List<PubSubNode> |
getNodes()
Gets the (sub-)nodes, which hierarchically reside under this node, e.g. the "second-level" nodes.
|
rocks.xmpp.extensions.data.model.DataForm |
getSubscriptionOptions()
Requests the subscription options for this node.
|
List<Subscription> |
getSubscriptions()
Gets the subscriptions for this node.
|
PubSubNode.Type |
getType()
Gets the type of this node.
|
String |
publish(Object item)
Publishes an item to this node.
|
String |
publish(String id,
Object item)
Publishes an item to this node.
|
void |
purge()
Purges this node of all published items.
|
void |
submitNodeConfiguration(rocks.xmpp.extensions.data.model.DataForm dataForm)
Submits the node configuration form.
|
void |
submitSubscriptionOptions(rocks.xmpp.extensions.data.model.DataForm dataForm)
Submits subscription options for this node.
|
Subscription |
subscribe()
Subscribes to this node.
|
Subscription |
subscribe(rocks.xmpp.extensions.data.model.DataForm dataForm)
Subscribes to and configures this node.
|
String |
toString() |
void |
unsubscribe()
Unsubscribes from this node.
|
void |
unsubscribe(String subscriptionId)
Unsubscribes from this node.
|
public NodeInfo getNodeInfo() throws rocks.xmpp.core.XmppException
rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic List<Item> discoverItems() throws rocks.xmpp.core.XmppException
rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic List<Subscription> getSubscriptions() throws rocks.xmpp.core.XmppException
rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic List<Affiliation> getAffiliations() throws rocks.xmpp.core.XmppException
rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic Subscription subscribe() throws rocks.xmpp.core.XmppException
rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic Subscription subscribe(rocks.xmpp.extensions.data.model.DataForm dataForm) throws rocks.xmpp.core.XmppException
dataForm - The configuration form.rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic void unsubscribe()
throws rocks.xmpp.core.XmppException
rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic void unsubscribe(String subscriptionId) throws rocks.xmpp.core.XmppException
subscriptionId - The subscription id.rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic rocks.xmpp.extensions.data.model.DataForm getSubscriptionOptions()
throws rocks.xmpp.core.XmppException
rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic void submitSubscriptionOptions(rocks.xmpp.extensions.data.model.DataForm dataForm)
throws rocks.xmpp.core.XmppException
dataForm - The subscription options form.rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic rocks.xmpp.extensions.data.model.DataForm getDefaultSubscriptionOptions()
throws rocks.xmpp.core.XmppException
rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic List<Item> getItems() throws rocks.xmpp.core.XmppException
rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic List<Item> getItems(String... ids) throws rocks.xmpp.core.XmppException
ids - The item ids.rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic List<Item> getItems(int maxItems) throws rocks.xmpp.core.XmppException
maxItems - The maximal number of items.rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic String publish(Object item) throws rocks.xmpp.core.XmppException
item - The item to be published. Note that this item must be known to the CoreContext, so that it can be marshalled into XML.rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic String publish(String id, Object item) throws rocks.xmpp.core.XmppException
id - The item's id.item - The item to be published. Note that this item must be known to the CoreContext, so that it can be marshalled into XML.rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic String create() throws rocks.xmpp.core.XmppException
rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic String create(rocks.xmpp.extensions.data.model.DataForm dataForm) throws rocks.xmpp.core.XmppException
dataForm - The configuration form.rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic rocks.xmpp.extensions.data.model.DataForm getNodeConfiguration()
throws rocks.xmpp.core.XmppException
rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic void submitNodeConfiguration(rocks.xmpp.extensions.data.model.DataForm dataForm)
throws rocks.xmpp.core.XmppException
dataForm - The configuration form.rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic void delete()
throws rocks.xmpp.core.XmppException
rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic void delete(URI uri) throws rocks.xmpp.core.XmppException
uri - The replacement node.rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic void purge()
throws rocks.xmpp.core.XmppException
rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic List<PubSubNode> getNodes() throws rocks.xmpp.core.XmppException
rocks.xmpp.core.stanza.model.StanzaException - If the entity returned a stanza error.NoResponseException - If the entity did not respond.rocks.xmpp.core.XmppExceptionpublic String getName()
public String getId()
public PubSubNode.Type getType()
Copyright © 2014 XMPP.rocks. All rights reserved.