Smack

org.jivesoftware.smackx.pubsub
Class SubscriptionEvent

java.lang.Object
  extended by org.jivesoftware.smackx.pubsub.NodeEvent
      extended by org.jivesoftware.smackx.pubsub.SubscriptionEvent
Direct Known Subclasses:
ItemDeleteEvent, ItemPublishEvent

public abstract class SubscriptionEvent
extends NodeEvent

Base class to represents events that are associated to subscriptions.

Author:
Robin Collier

Constructor Summary
protected SubscriptionEvent(java.lang.String nodeId)
          Construct an event with no subscription id's.
protected SubscriptionEvent(java.lang.String nodeId, java.util.List<java.lang.String> subscriptionIds)
          Construct an event with multiple subscriptions.
 
Method Summary
 java.util.List<java.lang.String> getSubscriptions()
          Get the subscriptions this event is associated with.
protected  void setSubscriptions(java.util.List<java.lang.String> subscriptionIds)
          Set the list of subscription id's for this event.
 
Methods inherited from class org.jivesoftware.smackx.pubsub.NodeEvent
getNodeId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubscriptionEvent

protected SubscriptionEvent(java.lang.String nodeId)
Construct an event with no subscription id's. This can occur when there is only one subscription to a node. The event may or may not report the subscription id along with the event.

Parameters:
nodeId - The id of the node the event came from

SubscriptionEvent

protected SubscriptionEvent(java.lang.String nodeId,
                            java.util.List<java.lang.String> subscriptionIds)
Construct an event with multiple subscriptions.

Parameters:
nodeId - The id of the node the event came from
subscriptionIds - The list of subscription id's
Method Detail

getSubscriptions

public java.util.List<java.lang.String> getSubscriptions()
Get the subscriptions this event is associated with.

Returns:
List of subscription id's

setSubscriptions

protected void setSubscriptions(java.util.List<java.lang.String> subscriptionIds)
Set the list of subscription id's for this event.

Parameters:
subscriptionIds - The list of subscription id's

Smack

Copyright © 2003-2007 Jive Software.