Functionalities of Different Functions
Learn about different methods for listening for values, exceptions, or events during the lifetime of a flow.
We'll cover the following
We can imagine flow as a pipe in which requests for the next values flow in one direction, and the corresponding produced values flow in the other direction. When flow is completed or an exception occurs, this information is also propagated, closing the intermediate steps along the way. So, as they all flow, we can listen for values, exceptions, or other characteristic events (like starting or completing) using methods such as:
onEach
onStart
onCompletion
onEmpty
, andcatch
Let’s explain these one by one.
Get hands-on with 1400+ tech skills courses.