SubscriptionRef

interface SubscriptionRef<T> : Actor

A reference to an Subscription for SubscriptionKey.

Parameters

T

Type of data to receive.

Properties

Link copied to clipboard
abstract val id: SubscriptionId<T>

A unique identifier used for managing SubscriptionKey.

Link copied to clipboard
abstract val state: StateFlow<SubscriptionState<T>>

State Flow to receive the current state of the subscription.

Functions

Link copied to clipboard
abstract fun cancel()

Cancels the Subscription.

Link copied to clipboard
abstract fun launchIn(scope: CoroutineScope): Job

Launches the actor.

Link copied to clipboard
abstract suspend fun reset()

Resets the Subscription.

Link copied to clipboard
abstract suspend fun resume()

Resumes the Subscription.