com.pubnub.api.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 Show documentation
Show all versions of pubnub-kotlin 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.api.subscribe.eventengine.event
import com.pubnub.api.PubNubException
import com.pubnub.api.eventengine.Event
import com.pubnub.api.models.consumer.pubsub.PNEvent
internal sealed class SubscribeEvent : Event {
data class SubscriptionChanged(val channels: Set, val channelGroups: Set) : SubscribeEvent()
data class SubscriptionRestored(
val channels: Set,
val channelGroups: Set,
val subscriptionCursor: SubscriptionCursor
) : SubscribeEvent()
object Disconnect : SubscribeEvent()
object Reconnect : SubscribeEvent()
object UnsubscribeAll : SubscribeEvent()
data class HandshakeSuccess(val subscriptionCursor: SubscriptionCursor) : SubscribeEvent()
data class HandshakeFailure(val reason: PubNubException) : SubscribeEvent()
data class HandshakeReconnectSuccess(val subscriptionCursor: SubscriptionCursor) : SubscribeEvent()
data class HandshakeReconnectFailure(val reason: PubNubException) : SubscribeEvent()
data class HandshakeReconnectGiveup(val reason: PubNubException) : SubscribeEvent()
data class ReceiveSuccess(val messages: List, val subscriptionCursor: SubscriptionCursor) :
SubscribeEvent()
data class ReceiveFailure(val reason: PubNubException) : SubscribeEvent()
data class ReceiveReconnectSuccess(val messages: List, val subscriptionCursor: SubscriptionCursor) :
SubscribeEvent()
data class ReceiveReconnectFailure(val reason: PubNubException) : SubscribeEvent()
data class ReceiveReconnectGiveup(val reason: PubNubException) : SubscribeEvent()
}