subscribe

Subscribes an Observer to a provided list of event types. 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

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