corda / net.corda.core.messaging / DataFeed

DataFeed

data class DataFeed<out A, B>

The Data feed contains a snapshot of the requested data and an Observable of future updates.

Constructors

<init>

DataFeed(snapshot: A, updates: <ERROR CLASS><B>)

The Data feed contains a snapshot of the requested data and an Observable of future updates.

Properties

snapshot

val snapshot: A

updates

val updates: <ERROR CLASS><B>

Extension Functions

contextLogger

fun Any.contextLogger(): <ERROR CLASS>

When called from a companion object, returns the logger for the enclosing class.

doOnError

fun <SNAPSHOT, ELEMENT> DataFeed<SNAPSHOT, ELEMENT>.doOnError(action: (Throwable) -> Unit): DataFeed<SNAPSHOT, ELEMENT>

Returns a DataFeed that processes errors according to the provided action.

mapErrors

fun <SNAPSHOT, ELEMENT> DataFeed<SNAPSHOT, ELEMENT>.mapErrors(transform: (Throwable) -> Throwable): DataFeed<SNAPSHOT, ELEMENT>

Returns a DataFeed that transforms errors according to the provided transform function.