SubscriptionIdleObject

data class SubscriptionIdleObject<T>(val reply: Reply<T>, val replyUpdatedAt: Long, val error: Throwable?, val errorUpdatedAt: Long, val subscribe: suspend () -> Unit, val unsubscribe: () -> Unit, val reset: suspend () -> Unit) : SubscriptionObject<T>

A SubscriptionIdleObject represents the initial idle state of the SubscriptionObject.

This means that no data has been received and there are no subscribers. This is the initial state when subscription processing has not been performed automatically.

Parameters

T

Type of data to receive.

Constructors

Link copied to clipboard
constructor(reply: Reply<T>, replyUpdatedAt: Long, error: Throwable?, errorUpdatedAt: Long, subscribe: suspend () -> Unit, unsubscribe: () -> Unit, reset: suspend () -> Unit)

Properties

Link copied to clipboard
open override val data: T?

The received value from the data source.

Link copied to clipboard
open override val error: Throwable?
Link copied to clipboard
open override val errorUpdatedAt: Long
Link copied to clipboard
Link copied to clipboard
open val isFailure: Boolean
Link copied to clipboard
open val isPending: Boolean
Link copied to clipboard
open val isSuccess: Boolean
Link copied to clipboard
open override val reply: Reply<T>
Link copied to clipboard
open override val replyUpdatedAt: Long
Link copied to clipboard
open override val reset: suspend () -> Unit

Resets the subscribed data and re-executes the subscription process.

Link copied to clipboard
open val revision: String
Link copied to clipboard
open override val status: SubscriptionStatus
Link copied to clipboard
open override val subscribe: suspend () -> Unit

Starts the subscription if not already subscribed.

Link copied to clipboard
Link copied to clipboard
open override val unsubscribe: () -> Unit

Cancels the subscription if currently subscribed.

Functions

Link copied to clipboard
open override fun isAwaited(): Boolean