
com.pubnub.internal.subscribe.eventengine.event.SubscribeEvent.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pubnub-kotlin-impl Show documentation
Show all versions of pubnub-kotlin-impl Show documentation
PubNub is a cross-platform client-to-client (1:1 and 1:many) push service in the cloud, capable of broadcasting real-time messages to millions of web and mobile clients simultaneously, in less than a quarter second!
package com.pubnub.internal.subscribe.eventengine.event
import com.pubnub.api.PubNubException
import com.pubnub.api.models.consumer.pubsub.PNEvent
import com.pubnub.internal.eventengine.Event
internal sealed class SubscribeEvent : Event {
class SubscriptionChanged(channels: Set, channelGroups: Set) : SubscribeEvent() {
val channels: Set = channels.toSet()
val channelGroups: Set = channelGroups.toSet()
}
class SubscriptionRestored(
channels: Set,
channelGroups: Set,
val subscriptionCursor: SubscriptionCursor,
) : SubscribeEvent() {
val channels: Set = channels.toSet()
val channelGroups: Set = channelGroups.toSet()
}
object Disconnect : SubscribeEvent()
data class Reconnect(val subscriptionCursor: SubscriptionCursor? = null) : SubscribeEvent()
object UnsubscribeAll : SubscribeEvent()
data class HandshakeSuccess(val subscriptionCursor: SubscriptionCursor) : SubscribeEvent()
data class HandshakeFailure(val reason: PubNubException) : SubscribeEvent()
data class ReceiveSuccess(val messages: List, val subscriptionCursor: SubscriptionCursor) :
SubscribeEvent()
data class ReceiveFailure(val reason: PubNubException) : SubscribeEvent()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy