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

com.pubnub.internal.EndpointImpl.kt Maven / Gradle / Ivy

package com.pubnub.internal

import com.pubnub.api.Endpoint
import com.pubnub.api.endpoints.HasOverridableConfig
import com.pubnub.api.v2.PNConfiguration
import com.pubnub.api.v2.PNConfigurationOverride
import com.pubnub.internal.v2.PNConfigurationImpl

abstract class EndpointImpl(private val endpoint: HasOverridableConfig) : Endpoint {
    override fun overrideConfiguration(action: PNConfigurationOverride.Builder.() -> Unit): Endpoint {
        endpoint.overrideConfiguration(PNConfigurationImpl.Builder(endpoint.configuration).apply(action).build())
        return this
    }

    override fun overrideConfiguration(configuration: PNConfiguration): Endpoint {
        endpoint.overrideConfiguration(configuration)
        return this
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy