- Mutiny provides two main classes: Uni and Multi.2 Uni represents an asynchronous action or operation.
- It can emit a single item or failure, if the represented action fails. Multi represents a stream of items.
- It can convey multiple items, as well as a terminal failure or completion event
Uni<UserProfile> uni = users.getUserByName(name);
return uni
.onItem().transform(user -> user.name)
.onFailure().recoverWithItem("anonymous");
- Multi can emit 0, 1, n, or an infinite number of items.