Class JdkFlowAdapter

java.lang.Object
reactor.adapter.JdkFlowAdapter

public abstract class JdkFlowAdapter extends Object
Convert a Java 9+ Flow.Publisher to/from a Reactive Streams Publisher.
Author:
Stephane Maldini, Sebastien Deleuze
  • Method Details

    • publisherToFlowPublisher

      public static <T> Flow.Publisher<T> publisherToFlowPublisher(Publisher<T> publisher)
      Return a java Flow.Publisher from a Flux
      Type Parameters:
      T - the type of the publisher
      Parameters:
      publisher - the source Publisher to convert
      Returns:
      a java Flow.Publisher from the given Publisher
    • flowPublisherToFlux

      public static <T> Flux<T> flowPublisherToFlux(Flow.Publisher<T> publisher)
      Return a Flux from a java Flow.Publisher
      Type Parameters:
      T - the type of the publisher
      Parameters:
      publisher - the source Publisher to convert
      Returns:
      a Flux from a java Flow.Publisher