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

com.pubnub.api.builder.PubSubOperations.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.builder

// basic publish/subscribe class
internal sealed class PubSubOperation

// concrete publish/subscribe cases
internal data class SubscribeOperation(
    val channels: List = emptyList(),
    val channelGroups: List = emptyList(),
    val presenceEnabled: Boolean = false,
    val timetoken: Long = 0L
) : PubSubOperation()

internal data class UnsubscribeOperation(
    val channels: List = emptyList(),
    val channelGroups: List = emptyList()
) : PubSubOperation()

internal data class PresenceOperation(
    val channels: List = emptyList(),
    val channelGroups: List = emptyList(),
    val connected: Boolean = false
) : PubSubOperation()

internal data class StateOperation(
    val channels: List = emptyList(),
    val channelGroups: List = emptyList(),
    val state: Any? = null
) : PubSubOperation()

internal data class TimetokenRegionOperation(
    val timetoken: Long = 0L,
    val region: String
) : PubSubOperation()

internal object ConnectedStatusAnnouncedOperation : PubSubOperation()

internal object NoOpOperation : PubSubOperation()




© 2015 - 2024 Weber Informatics LLC | Privacy Policy