The Mono.from method

The From methods are used to  build a Flux when the value can be determined from an existing source. Unlike the Flux methods, where the sources are multi-valued, the sources for Mono are single-valued. These methods are offered in the following variants:

  • fromCallable: This method generates Mono with one value, followed by the completion event. If multi-valued datasets, like arrays or collections, are returned from Callable, then the complete dataset is pushed as an object in the single event.
  • fromFuture: This method generates Mono with one value, followed by the completion event.
  • fromSupplier: This method generates Mono with one value, followed by the completion event. 
  • fromRunnable: This method generates Mono with no ...

Get Hands-On Reactive Programming with Reactor 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.