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 an Action0 function to get called when a Subscriber subscribes to the Observable.
  • doOnUnsubscribe(Action0): Registers an Action0 function to get called when a Subscriber unsubscribes from the Observable ...

Get Asynchronous Android Programming - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.