title: Mono class in Java: what is, and when to use?
body: <p>I have this following code:</p>
  
  <pre><code>import org.springframework.http.MediaType;
  import org.springframework.stereotype.Component;
  import org.springframework.web.reactive.function.BodyInserters;
  import org.springframework.web.reactive.function.server.ServerRequest;
  import org.springframework.web.reactive.function.server.ServerResponse;
  import reactor.core.publisher.Mono;
  
  @Component
  public class GreetingHandler 
      public Mono&lt;ServerResponse&gt; hello(ServerRequest request) {
          return ServerResponse.ok().contentType(MediaType.TEXT_PLAIN)
          .body(BodyInserters.fromValue("Hello Spring!"));
      }
  }
  </code></pre>
  
  <p>I understand this code except what the class Mono does and what are its features. I did a lot of search but it didn't goes straight to the point: <strong>what is the class Mono</strong> and <strong>when to use it</strong>?</p>