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

jvmMain.com.pubnub.api.Endpoint.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!

The newest version!
package com.pubnub.api

import com.pubnub.api.endpoints.remoteaction.ExtendedRemoteAction
import com.pubnub.api.v2.PNConfiguration
import com.pubnub.api.v2.PNConfigurationOverride

interface Endpoint : ExtendedRemoteAction {
    /**
     * Allows to override certain configuration options (see [PNConfigurationOverride.Builder]) for this request only.
     *
     * @return Returns the same instance for convenience, so [sync] or [async] can be called next.
     */
    fun overrideConfiguration(action: PNConfigurationOverride.Builder.() -> Unit): Endpoint

    /**
     * Allows to override certain configuration options (see [PNConfigurationOverride.Builder]) for this request only.
     *
     * [PNConfigurationOverride.from] should be used to obtain a [PNConfigurationOverride.Builder]. Only options
     * present in [PNConfigurationOverride.Builder] will be used for the override.
     *
     * Example:
     * ```
     * val configOverride = PNConfigurationOverride.from(pubnub.configuration).apply {
     *     userId = UserId("example")
     * }.build()
     *
     * val result = endpoint.overrideConfiguration(configOverride).sync()
     * ```
     *
     * @return Returns the same instance for convenience, so [sync] or [async] can be called next.
     */
    fun overrideConfiguration(configuration: PNConfiguration): Endpoint
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy