fun subscribe(stream: String, onChangeListener: OnChangeListener<T>): StreamObserver<T>
Subscribes to the given stream. The events are dispatched on the main thread. If stream already has data set, it will be delivered to the listener. You should call unsubscribe to stop observing LiveStream.
onChangeListener
- The observer which will receive the events.
Return
StreamObserver Reference will be useful when you'll
need to call a
method unsubscribe.