Package-level declarations

Types

Link copied to clipboard
interface Relay<T> : Observable<T> , ValueCallback<T>

Represents an Observable and a ValueCallback at the same time, which means the Relay interface is both a producer and a consumer. Unlike Subject, the Relay interface does not have onError and onComplete callbacks. A Relay can only be supplied with values via ValueCallback.onNext callback.

Link copied to clipboard
interface Subject<T> : Relay<T> , ObservableCallbacks<T>

Represents an Observable and ObservableCallbacks at the same time. The Subject interface extends the Relay interface, adding the onError and onComplete callbacks through the ObservableCallbacks interface.

Properties

Link copied to clipboard

Returns true if the Status is Active, false otherwise

Returns true if the Subjects Status is Active, false otherwise

Functions

Link copied to clipboard
fun <T> Subject<T>.getObserver(onSubscribe: (Disposable) -> Unit? = null): ObservableObserver<T>

Creates and returns an ObservableObserver that can be used to subscribe this Subject to an Observable. All signals from all Observables subscribed using the returned ObservableObserver are sent to this Subject.