All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.pubnub.api.subscribe.eventengine.event.SubscribeEvent.kt Maven / Gradle / Ivy

Go to download

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!

There is a newer version: 10.2.0
Show newest version
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()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy