SubscriptionSet
A helper class that manages multiple Subscriptions that can be added to it.
Use the com.pubnub.api.PubNub.subscriptionSetOf factory methods to create instances of this interface.
Adding multiple Subscriptions to the set, then calling subscribe or unsubscribe on the set is more efficient than calling Subscription.subscribe on each Subscription object separately, as the PubNub client can minimize the number of required reconnections internally.
Remember to always close the set when you're done using it to avoid memory leaks. Closing the set also closes all Subscriptions that are part of this set.
Properties
A nullable property to set a function or lambda for responding to file events. This function is invoked whenever a new file event is received, providing a convenient way to process or react to file events.
A nullable property that can be set to a function (or lambda expression) to handle incoming message events. This function is invoked whenever a new message is received, providing a convenient way to process or react to messages.
A nullable property that allows setting a function or lambda to react to message action events. This function is invoked whenever a new message action is received, providing a convenient way to process or react to message actions.
A nullable property for assigning a function or lambda to handle object events. This function is triggered with each new object event, providing a mechanism to manage object-related updates.
A nullable property designed to set a function or lambda expression for handling incoming presence events. This function is called whenever a new presence event occurs, offering an efficient method for tracking presence updates.
A nullable property for assigning a function or lambda expression to handle incoming signal events. This function is called whenever a new signal is received, providing a convenient way to process or react to signals.
Returns an immutable copy of the set of subscriptions contained in this SubscriptionSet.
Functions
Add a Subscription to this set.
Add a listener.
Remove the subscription from this set. Equivalent to calling remove.
Add the subscription to this SubscriptionSet. Equivalent to calling add.
Remove the subscription from this set.
Removes all listeners.
Remove a listener.