Package org.jivesoftware.smackx.pubsub
Class SubscriptionEvent
java.lang.Object
org.jivesoftware.smackx.pubsub.NodeEvent
org.jivesoftware.smackx.pubsub.SubscriptionEvent
- Direct Known Subclasses:
ItemDeleteEvent
,ItemPublishEvent
Base class to represents events that are associated to subscriptions.
-
Constructor Summary
ModifierConstructorDescriptionprotected
SubscriptionEvent
(String nodeId) Construct an event with no subscription id's.protected
SubscriptionEvent
(String nodeId, List<String> subscriptionIds) Construct an event with multiple subscriptions. -
Method Summary
Modifier and TypeMethodDescriptionGet the subscriptions this event is associated with.protected void
setSubscriptions
(List<String> subscriptionIds) Set the list of subscription id's for this event.
-
Constructor Details
-
SubscriptionEvent
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
Construct an event with multiple subscriptions.- Parameters:
nodeId
- The id of the node the event came fromsubscriptionIds
- The list of subscription id's
-
-
Method Details
-
getSubscriptions
Get the subscriptions this event is associated with.- Returns:
- List of subscription id's
-
setSubscriptions
Set the list of subscription id's for this event.- Parameters:
subscriptionIds
- The list of subscription id's
-