public class Subscription extends NodeExtension
| Modifier and Type | Class and Description |
|---|---|
static class |
Subscription.State |
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
configRequired |
protected java.lang.String |
id |
protected org.jxmpp.jid.Jid |
jid |
protected Subscription.State |
state |
| Constructor and Description |
|---|
Subscription(org.jxmpp.jid.Jid subscriptionJid)
Used to constructs a subscription request to the root node with the specified
JID.
|
Subscription(org.jxmpp.jid.Jid subscriptionJid,
java.lang.String nodeId)
Used to constructs a subscription request to the specified node with the specified
JID.
|
Subscription(org.jxmpp.jid.Jid jid,
java.lang.String nodeId,
java.lang.String subscriptionId,
Subscription.State state)
Constructs a representation of a subscription reply to the specified node
and JID.
|
Subscription(org.jxmpp.jid.Jid jid,
java.lang.String nodeId,
java.lang.String subscriptionId,
Subscription.State state,
boolean configRequired)
Constructs a representation of a subscription reply to the specified node
and JID.
|
Subscription(org.jxmpp.jid.Jid subscriptionJid,
Subscription.State state)
Construct a subscription change request to the specified state.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addXml(org.jivesoftware.smack.util.XmlStringBuilder xml) |
java.lang.String |
getId()
Gets the subscription id.
|
org.jxmpp.jid.Jid |
getJid()
Gets the JID the subscription is created for.
|
Subscription.State |
getState()
Gets the current subscription state.
|
boolean |
isConfigRequired()
This value is only relevant when the
getState() is Subscription.State.unconfigured. |
getElementName, getNamespace, getNode, getPubSubNamespace, toString, toXMLclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitprotected org.jxmpp.jid.Jid jid
protected java.lang.String id
protected Subscription.State state
protected boolean configRequired
public Subscription(org.jxmpp.jid.Jid subscriptionJid)
subscriptionJid - The subscriber JIDpublic Subscription(org.jxmpp.jid.Jid subscriptionJid,
java.lang.String nodeId)
subscriptionJid - The subscriber JIDnodeId - The node idpublic Subscription(org.jxmpp.jid.Jid subscriptionJid,
Subscription.State state)
subscriptionJid - The subscriber JIDstate - The requested new statepublic Subscription(org.jxmpp.jid.Jid jid,
java.lang.String nodeId,
java.lang.String subscriptionId,
Subscription.State state)
jid - The JID the request was made undernodeId - The node subscribed tosubscriptionId - The id of this subscriptionstate - The current state of the subscriptionpublic Subscription(org.jxmpp.jid.Jid jid,
java.lang.String nodeId,
java.lang.String subscriptionId,
Subscription.State state,
boolean configRequired)
jid - The JID the request was made undernodeId - The node subscribed tosubscriptionId - The id of this subscriptionstate - The current state of the subscriptionconfigRequired - Is configuration required to complete the subscriptionpublic org.jxmpp.jid.Jid getJid()
public java.lang.String getId()
public Subscription.State getState()
public boolean isConfigRequired()
getState() is Subscription.State.unconfigured.protected void addXml(org.jivesoftware.smack.util.XmlStringBuilder xml)
addXml in class NodeExtension