Target filter
Search Kotlin docs
  • Back
  • Tealium Prism Kotlin SDK Reference
core/com.tealium.prism.core.api.pubsub/SubscribableState

SubscribableState

interface SubscribableState<T> : Subscribable<T>

A SubscribableState object allows you to subscribe an Observer to receive updates from a specific source - as with Subscribable. Each updated value will be provided through the given Observer.onNext method.

The SubscribableState also maintains the current value of the property for synchronous access

Updates can be immediate, or asynchronous depending on the underlying source.

To stop observing updates, use the Disposable.dispose method of the returned Disposable.

See also

Subscribable

Inheritors

ObservableState

Properties

value
Link copied to clipboard
abstract val value: T

The current value of the property.

Functions

subscribe
Link copied to clipboard
open fun subscribe(onNext: Consumer<T>): Disposable

Subscribes the given onNext to receive updates, where no Observer.onComplete is required.

abstract fun subscribe(observer: Observer<T>): Disposable

Subscribes the given observer to receive updates, including an Observer.onComplete notification when the upstream source terminates.

open fun subscribe(onNext: Consumer<T>, onComplete: Runnable): Disposable

Subscribes the given onNext to receive updates, and the given onComplete to receive the Observer.onComplete signal

Generated by Dokka
(c) Tealium 2026