Class JavaFlowSupport.Source

java.lang.Object
org.apache.pekko.stream.javadsl.JavaFlowSupport.Source
Enclosing class:
JavaFlowSupport

public static final class JavaFlowSupport.Source extends Object
{@link org.apache.pekko.stream.javadsl.Flow]] factories operating with java.util.concurrent.Flow.* interfaces.
  • Method Details

    • fromPublisher

      public static <T> Source<T,NotUsed> fromPublisher(Flow.Publisher<T> publisher)
      Helper to create Source from Flow.Publisher.

      Construct a transformation starting with given publisher. The transformation steps are executed by a series of Flow.Processor instances that mediate the flow of elements downstream and the propagation of back-pressure upstream.

      See also Source.fromPublisher if wanting to integrate with Publisher instead (which carries the same semantics, however existed before RS's inclusion in Java 9).

    • asSubscriber

      public static <T> Source<T,Flow.Subscriber<T>> asSubscriber()
      Creates a Source that is materialized as a Flow.Subscriber.

      See also Source.asSubscriber if wanting to integrate with Subscriber instead (which carries the same semantics, however existed before RS's inclusion in Java 9).