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

io.getunleash.UnleashClientSpec.kt Maven / Gradle / Ivy

The newest version!
package io.getunleash

import io.getunleash.data.Variant
import io.getunleash.polling.TogglesErroredListener
import io.getunleash.polling.TogglesUpdatedListener
import java.io.Closeable
import java9.util.concurrent.CompletableFuture

interface UnleashClientSpec : Closeable {
    fun isEnabled(toggleName: String, defaultValue: Boolean = false): Boolean
    fun getVariant(toggleName: String): Variant
    fun updateContext(context: UnleashContext): CompletableFuture
    fun getContext(): UnleashContext
    fun addTogglesUpdatedListener(listener: TogglesUpdatedListener)
    fun removeTogglesUpdatedListener(listener: TogglesUpdatedListener)
    fun addTogglesErroredListener(listener: TogglesErroredListener)
    fun removeTogglesErroredListener(listener: TogglesErroredListener)

    fun startPolling()
    fun isPolling(): Boolean
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy