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 key: SubscriptionKey<T>

The SubscriptionKey for the Subscription.

Link copied to clipboard
abstract val marker: Marker

The Marker specified in SubscriptionClient.getSubscription.

Link copied to clipboard

The SubscriptionOptions configured for the subscription.

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
open suspend fun reset()

Resets the Subscription.

Link copied to clipboard
abstract suspend fun resume()

Resumes the Subscription.

Link copied to clipboard
abstract suspend fun send(command: SubscriptionCommand<T>)

Sends a SubscriptionCommand to the Actor.