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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.