SubscriptionLoadingObject

data class SubscriptionLoadingObject<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 SubscriptionLoadingObject represents the initial loading state of the SubscriptionObject.

This means that no data is being received and there is at least one more subscriber.

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