Observable(androidJvm)

The `observable` interface provides basic Publish&Subscribe functionality. Classes that extend this functionality and capable of generating events, have to specify event types and corresponding data format for an event.

open class Observable(androidJvm) : ObservableInterface

Functions

subscribe
Link copied to clipboard

Subscribes an `observer` to a provided array of event types. The `observable` will hold a strong reference to an `observer` instance, therefore, in order to stop receiving notifications, caller must call `unsubscribe` with an `observer` instance used for an initial subscription.

open fun subscribe(observer: Observer, events: List<String>)
unsubscribe
Link copied to clipboard

Unsubscribes an `observer` from all events.

open fun unsubscribe(observer: Observer)

Unsubscribes an `observer` from a provided array of event types.

open fun unsubscribe(observer: Observer, events: List<String>)

Inheritors

StyleManager
Link copied to clipboard