Monitoring the event stream
Although so far we have been using the Observable
operators to manipulate stream events, there are operators that allow us to monitor the events without changing them. These operators, known sometimes as utility operators, are able to react to the events or errors emitted on the Observable
chain created between the source Observable
and the final Subscriber
without creating any side effects.
Let's enumerate them and explain the more common utility operators used to observe the event stream:
doOnSubscribe(Action0)
: Registers anAction0
function to get called when aSubscriber
subscribes to theObservable
.doOnUnsubscribe(Action0)
: Registers anAction0
function to get called when aSubscriber
unsubscribes from theObservable ...
Get Asynchronous Android Programming - Second Edition now with O’Reilly online learning.
O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.