| 
 | Smack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jivesoftware.smackx.pubsub.NodeExtension
org.jivesoftware.smackx.pubsub.Subscription
public class Subscription
Represents a subscription to node for both requests and replies.
| Nested Class Summary | |
|---|---|
| static class | Subscription.State | 
| Field Summary | |
|---|---|
| protected  boolean | configRequired | 
| protected  String | id | 
| protected  String | jid | 
| protected  Subscription.State | state | 
| Constructor Summary | |
|---|---|
| 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. | |
| Method Summary | |
|---|---|
|  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()isSubscription.State.unconfigured | 
|  String | toXML()Returns the XML representation of the PacketExtension. | 
| Methods inherited from class org.jivesoftware.smackx.pubsub.NodeExtension | 
|---|
| getElementName, getNamespace, getNode, toString | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
protected String jid
protected String id
protected Subscription.State state
protected boolean configRequired
| Constructor Detail | 
|---|
public Subscription(String subscriptionJid)
subscriptionJid - The subscriber JID
public Subscription(String subscriptionJid,
                    String nodeId)
subscriptionJid - The subscriber JIDnodeId - The node id
public 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 subscription
public 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 subscription| Method Detail | 
|---|
public String getJid()
public String getId()
public Subscription.State getState()
public boolean isConfigRequired()
getState() is Subscription.State.unconfigured
public String toXML()
PacketExtension
toXML in interface PacketExtensiontoXML in class NodeExtension| 
 | Smack | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||