Stream

interface Stream<T>

A simple representation of an observable stream. Subscription will requires a key to avoid multiple subscription of the same observable.

Inheritors

Functions

Link copied to clipboard
abstract fun clear()

Remove all the observable from this stream

Link copied to clipboard
abstract fun latest(): T?

Get the latest value of the stream

Link copied to clipboard
abstract fun onNext(data1: T?)

Post data to the stream

Link copied to clipboard
abstract fun subscribe(key: Any, observer: (T?) -> Unit)

Add an observable to receive future values of the stream

Link copied to clipboard
abstract fun unsubscribe(key: Any)

Stop the observable at {key} from receiving events