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 java.lang.String |
jid |
protected Subscription.State |
state |
Constructor and Description |
---|
Subscription(java.lang.String subscriptionJid)
Used to constructs a subscription request to the root node with the specified
JID.
|
Subscription(java.lang.String subscriptionJid,
java.lang.String nodeId)
Used to constructs a subscription request to the specified node with the specified
JID.
|
Subscription(java.lang.String 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(java.lang.String 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.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getId()
Gets the subscription id.
|
java.lang.String |
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 . |
java.lang.String |
toXML()
Returns the XML representation of this Element.
|
getElementName, getNamespace, getNode, toString
protected java.lang.String jid
protected java.lang.String id
protected Subscription.State state
protected boolean configRequired
public Subscription(java.lang.String subscriptionJid)
subscriptionJid
- The subscriber JIDpublic Subscription(java.lang.String subscriptionJid, java.lang.String nodeId)
subscriptionJid
- The subscriber JIDnodeId
- The node idpublic Subscription(java.lang.String 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(java.lang.String 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 java.lang.String getJid()
public java.lang.String getId()
public Subscription.State getState()
public boolean isConfigRequired()
getState()
is Subscription.State.unconfigured
.