@Test public void fromFlowSuccess() throws Exception { Publisher<Integer> flowPublisher = newMockFlowPublisher((subscriber, __) -> { subscriber.onNext(1); subscriber.onComplete(); }); Integer result = fromFlowPublisher(flowPublisher).firstOrElse(() -> null).toFuture().get(); assertThat("Unexpected result", result, is(1)); }
public static <T> Publisher<T> fromFlowPublisher(java.util.concurrent.Flow.Publisher<T> source) { return new FlowToStPublisher<>(source); }
JdkFlowAdapters { public static <T> Publisher<T> fromFlowPublisher(java.util.concurrent.Flow.Publisher<T> source) { return new FlowToStPublisher<>(source); } }
JdkFlowAdapters { public static <T> Publisher<T> fromFlowPublisher(java.util.concurrent.Flow.Publisher<T> source) { return new FlowToStPublisher<>(source); } private  JdkFlowAdapters(); }
JdkFlowAdapters { public static <T> Publisher<T> fromFlowPublisher(java.util.concurrent.Flow.Publisher<T> source) { return new FlowToStPublisher<>(source); } private  JdkFlowAdapters(); static Publisher<T> fromFlowPublisher(java.util.concurrent.Flow.Publisher<T> source); static java.util.concurrent.Flow.Publisher<T> toFlowPublisher(Publisher<T> publisher); static java.util.concurrent.Flow.Publisher<T> toFlowPublisher(PublisherSource<T> source); }
JdkFlowAdapters { public static <T> Publisher<T> fromFlowPublisher(java.util.concurrent.Flow.Publisher<T> source) { return new FlowToStPublisher<>(source); } private  JdkFlowAdapters(); static Publisher<T> fromFlowPublisher(java.util.concurrent.Flow.Publisher<T> source); static java.util.concurrent.Flow.Publisher<T> toFlowPublisher(Publisher<T> publisher); static java.util.concurrent.Flow.Publisher<T> toFlowPublisher(PublisherSource<T> source);  }