subscriptionSetOf

expect abstract fun subscriptionSetOf(subscriptions: Set<Subscription>): SubscriptionSet
expect abstract fun subscriptionSetOf(channels: Set<String> = emptySet(), channelGroups: Set<String> = emptySet(), options: SubscriptionOptions = EmptyOptions): SubscriptionSet
actual abstract fun subscriptionSetOf(subscriptions: Set<Subscription>): SubscriptionSet

Create a SubscriptionSet from the given subscriptions.

Return

a SubscriptionSet containing all subscriptions

Parameters

subscriptions

the subscriptions that will be added to the returned SubscriptionSet


actual abstract fun subscriptionSetOf(channels: Set<String>, channelGroups: Set<String>, options: SubscriptionOptions): SubscriptionSet

Create a SubscriptionSet containing Subscription objects for the given sets of channels and channelGroups.

Please note that the subscriptions are not active until you call SubscriptionSet.subscribe.

This is a convenience method, and it is equal to calling PubNub.channel followed by Channel.subscription for each channel, then creating a subscriptionSetOf using the returned Subscription objects (and similarly for channel groups).

Return

a SubscriptionSet containing subscriptions for the given channels and channelGroups

Parameters

channels

the channels to create subscriptions for

channelGroups

the channel groups to create subscriptions for

options

the SubscriptionOptions to pass for each subscription. Refer to supported options in Channel and ChannelGroup documentation.

actual abstract fun subscriptionSetOf(subscriptions: Set<Subscription>): SubscriptionSet
actual abstract fun subscriptionSetOf(channels: Set<String>, channelGroups: Set<String>, options: SubscriptionOptions): SubscriptionSet