SubscriptionErrorObject

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

A SubscriptionErrorObject represents the error state of the SubscriptionObject.

This means that an error occurred during the subscription process and the subscription is being stopped, and you must call reset to restart the subscription.

Parameters

T

Type of data to receive.

Constructors

Link copied to clipboard
constructor(reply: Reply<T>, replyUpdatedAt: Long, error: Throwable, errorUpdatedAt: Long, subscriberStatus: SubscriberStatus, 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