subscribe

abstract fun subscribe(observer: Observer, events: List<String>)

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.

Parameters

events

An array of event types to be subscribed to.

observer

An `observer` that will be subscribed to a given events.