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 String |
id |
protected String |
jid |
protected Subscription.State |
state |
Constructor and Description |
---|
Subscription(String subscriptionJid)
Used to constructs a subscription request to the root node with the specified
JID.
|
Subscription(String subscriptionJid,
String nodeId)
Used to constructs a subscription request to the specified node with the specified
JID.
|
Subscription(String jid,
String nodeId,
String subscriptionId,
Subscription.State state)
Constructs a representation of a subscription reply to the specified node
and JID.
|
Subscription(String jid,
String nodeId,
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 |
---|---|
String |
getId()
Gets the subscription id
|
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 |
String |
toXML()
Returns the XML representation of the PacketExtension.
|
getElementName, getNamespace, getNode, toString
protected String jid
protected String id
protected Subscription.State state
protected boolean configRequired
public Subscription(String subscriptionJid)
subscriptionJid
- The subscriber JIDpublic Subscription(String subscriptionJid, String nodeId)
subscriptionJid
- The subscriber JIDnodeId
- The node idpublic Subscription(String jid, String nodeId, 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(String jid, String nodeId, 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 String getJid()
public String getId()
public Subscription.State getState()
public boolean isConfigRequired()
getState()
is Subscription.State.unconfigured
public String toXML()
PacketExtension
toXML
in interface PacketExtension
toXML
in class NodeExtension
Copyright © 2003-2007 Jive Software.