Class LazyPublisherBuilder<T>

  • All Implemented Interfaces:
    org.eclipse.microprofile.reactive.streams.operators.ConnectingOperators<T>, org.eclipse.microprofile.reactive.streams.operators.ConsumingOperators<T>, org.eclipse.microprofile.reactive.streams.operators.ErrorHandlingOperators<T>, org.eclipse.microprofile.reactive.streams.operators.FilteringOperators<T>, org.eclipse.microprofile.reactive.streams.operators.PeekingOperators<T>, org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>, org.eclipse.microprofile.reactive.streams.operators.TransformingOperators<T>

    public final class LazyPublisherBuilder<T>
    extends java.lang.Object
    implements org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.reactivestreams.Publisher<T> buildRs()  
      org.reactivestreams.Publisher<T> buildRs​(org.eclipse.microprofile.reactive.streams.operators.spi.ReactiveStreamsEngine engine)  
      org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<java.lang.Void> cancel()  
      <R> org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<R> collect​(java.util.function.Supplier<R> supplier, java.util.function.BiConsumer<R,​? super T> accumulator)  
      <R,​A>
      org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<R>
      collect​(java.util.stream.Collector<? super T,​A,​R> collector)  
      LazyPublisherBuilder<T> distinct()  
      LazyPublisherBuilder<T> dropWhile​(java.util.function.Predicate<? super T> predicate)  
      LazyPublisherBuilder<T> filter​(java.util.function.Predicate<? super T> predicate)  
      org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<java.util.Optional<T>> findFirst()  
      <S> LazyPublisherBuilder<S> flatMap​(java.util.function.Function<? super T,​? extends org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<? extends S>> mapper)  
      <S> LazyPublisherBuilder<S> flatMapCompletionStage​(java.util.function.Function<? super T,​? extends java.util.concurrent.CompletionStage<? extends S>> mapper)  
      <S> LazyPublisherBuilder<S> flatMapIterable​(java.util.function.Function<? super T,​? extends java.lang.Iterable<? extends S>> mapper)  
      <S> LazyPublisherBuilder<S> flatMapRsPublisher​(java.util.function.Function<? super T,​? extends org.reactivestreams.Publisher<? extends S>> mapper)  
      org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<java.lang.Void> forEach​(java.util.function.Consumer<? super T> action)  
      org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<java.lang.Void> ignore()  
      static <T> LazyPublisherBuilder<T> lazyPublisherBuilder​(java.util.function.Supplier<org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>> publisherBuilderSupplier)  
      LazyPublisherBuilder<T> limit​(long maxSize)  
      <R> LazyPublisherBuilder<R> map​(java.util.function.Function<? super T,​? extends R> mapper)  
      LazyPublisherBuilder<T> onComplete​(java.lang.Runnable action)  
      LazyPublisherBuilder<T> onError​(java.util.function.Consumer<java.lang.Throwable> errorHandler)  
      LazyPublisherBuilder<T> onErrorResume​(java.util.function.Function<java.lang.Throwable,​? extends T> errorHandler)  
      LazyPublisherBuilder<T> onErrorResumeWith​(java.util.function.Function<java.lang.Throwable,​? extends org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<? extends T>> errorHandler)  
      LazyPublisherBuilder<T> onErrorResumeWithRsPublisher​(java.util.function.Function<java.lang.Throwable,​? extends org.reactivestreams.Publisher<? extends T>> errorHandler)  
      LazyPublisherBuilder<T> onTerminate​(java.lang.Runnable action)  
      LazyPublisherBuilder<T> peek​(java.util.function.Consumer<? super T> consumer)  
      org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<java.util.Optional<T>> reduce​(java.util.function.BinaryOperator<T> accumulator)  
      org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<T> reduce​(T identity, java.util.function.BinaryOperator<T> accumulator)  
      LazyPublisherBuilder<T> skip​(long n)  
      LazyPublisherBuilder<T> takeWhile​(java.util.function.Predicate<? super T> predicate)  
      <R> org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<R> to​(org.eclipse.microprofile.reactive.streams.operators.SubscriberBuilder<? super T,​? extends R> subscriberBuilder)  
      org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<java.lang.Void> to​(org.reactivestreams.Subscriber<? super T> subscriber)  
      org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<java.util.List<T>> toList()  
      <R> LazyPublisherBuilder<R> via​(org.eclipse.microprofile.reactive.streams.operators.ProcessorBuilder<? super T,​? extends R> processorBuilder)  
      <R> LazyPublisherBuilder<R> via​(org.reactivestreams.Processor<? super T,​? extends R> processor)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • lazyPublisherBuilder

        public static <T> LazyPublisherBuilder<T> lazyPublisherBuilder​(java.util.function.Supplier<org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>> publisherBuilderSupplier)
      • map

        public <R> LazyPublisherBuilder<R> map​(java.util.function.Function<? super T,​? extends R> mapper)
        Specified by:
        map in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
        Specified by:
        map in interface org.eclipse.microprofile.reactive.streams.operators.TransformingOperators<T>
      • flatMap

        public <S> LazyPublisherBuilder<S> flatMap​(java.util.function.Function<? super T,​? extends org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<? extends S>> mapper)
        Specified by:
        flatMap in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
        Specified by:
        flatMap in interface org.eclipse.microprofile.reactive.streams.operators.TransformingOperators<T>
      • flatMapRsPublisher

        public <S> LazyPublisherBuilder<S> flatMapRsPublisher​(java.util.function.Function<? super T,​? extends org.reactivestreams.Publisher<? extends S>> mapper)
        Specified by:
        flatMapRsPublisher in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
        Specified by:
        flatMapRsPublisher in interface org.eclipse.microprofile.reactive.streams.operators.TransformingOperators<T>
      • flatMapCompletionStage

        public <S> LazyPublisherBuilder<S> flatMapCompletionStage​(java.util.function.Function<? super T,​? extends java.util.concurrent.CompletionStage<? extends S>> mapper)
        Specified by:
        flatMapCompletionStage in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
        Specified by:
        flatMapCompletionStage in interface org.eclipse.microprofile.reactive.streams.operators.TransformingOperators<T>
      • flatMapIterable

        public <S> LazyPublisherBuilder<S> flatMapIterable​(java.util.function.Function<? super T,​? extends java.lang.Iterable<? extends S>> mapper)
        Specified by:
        flatMapIterable in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
        Specified by:
        flatMapIterable in interface org.eclipse.microprofile.reactive.streams.operators.TransformingOperators<T>
      • filter

        public LazyPublisherBuilder<T> filter​(java.util.function.Predicate<? super T> predicate)
        Specified by:
        filter in interface org.eclipse.microprofile.reactive.streams.operators.FilteringOperators<T>
        Specified by:
        filter in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • distinct

        public LazyPublisherBuilder<T> distinct()
        Specified by:
        distinct in interface org.eclipse.microprofile.reactive.streams.operators.FilteringOperators<T>
        Specified by:
        distinct in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • limit

        public LazyPublisherBuilder<T> limit​(long maxSize)
        Specified by:
        limit in interface org.eclipse.microprofile.reactive.streams.operators.FilteringOperators<T>
        Specified by:
        limit in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • skip

        public LazyPublisherBuilder<T> skip​(long n)
        Specified by:
        skip in interface org.eclipse.microprofile.reactive.streams.operators.FilteringOperators<T>
        Specified by:
        skip in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • takeWhile

        public LazyPublisherBuilder<T> takeWhile​(java.util.function.Predicate<? super T> predicate)
        Specified by:
        takeWhile in interface org.eclipse.microprofile.reactive.streams.operators.FilteringOperators<T>
        Specified by:
        takeWhile in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • dropWhile

        public LazyPublisherBuilder<T> dropWhile​(java.util.function.Predicate<? super T> predicate)
        Specified by:
        dropWhile in interface org.eclipse.microprofile.reactive.streams.operators.FilteringOperators<T>
        Specified by:
        dropWhile in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • peek

        public LazyPublisherBuilder<T> peek​(java.util.function.Consumer<? super T> consumer)
        Specified by:
        peek in interface org.eclipse.microprofile.reactive.streams.operators.PeekingOperators<T>
        Specified by:
        peek in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • onError

        public LazyPublisherBuilder<T> onError​(java.util.function.Consumer<java.lang.Throwable> errorHandler)
        Specified by:
        onError in interface org.eclipse.microprofile.reactive.streams.operators.PeekingOperators<T>
        Specified by:
        onError in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • onTerminate

        public LazyPublisherBuilder<T> onTerminate​(java.lang.Runnable action)
        Specified by:
        onTerminate in interface org.eclipse.microprofile.reactive.streams.operators.PeekingOperators<T>
        Specified by:
        onTerminate in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • onComplete

        public LazyPublisherBuilder<T> onComplete​(java.lang.Runnable action)
        Specified by:
        onComplete in interface org.eclipse.microprofile.reactive.streams.operators.PeekingOperators<T>
        Specified by:
        onComplete in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • forEach

        public org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<java.lang.Void> forEach​(java.util.function.Consumer<? super T> action)
        Specified by:
        forEach in interface org.eclipse.microprofile.reactive.streams.operators.ConsumingOperators<T>
        Specified by:
        forEach in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • ignore

        public org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<java.lang.Void> ignore()
        Specified by:
        ignore in interface org.eclipse.microprofile.reactive.streams.operators.ConsumingOperators<T>
        Specified by:
        ignore in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • cancel

        public org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<java.lang.Void> cancel()
        Specified by:
        cancel in interface org.eclipse.microprofile.reactive.streams.operators.ConsumingOperators<T>
        Specified by:
        cancel in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • reduce

        public org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<T> reduce​(T identity,
                                                                                              java.util.function.BinaryOperator<T> accumulator)
        Specified by:
        reduce in interface org.eclipse.microprofile.reactive.streams.operators.ConsumingOperators<T>
        Specified by:
        reduce in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • reduce

        public org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<java.util.Optional<T>> reduce​(java.util.function.BinaryOperator<T> accumulator)
        Specified by:
        reduce in interface org.eclipse.microprofile.reactive.streams.operators.ConsumingOperators<T>
        Specified by:
        reduce in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • findFirst

        public org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<java.util.Optional<T>> findFirst()
        Specified by:
        findFirst in interface org.eclipse.microprofile.reactive.streams.operators.ConsumingOperators<T>
        Specified by:
        findFirst in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • collect

        public <R,​A> org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<R> collect​(java.util.stream.Collector<? super T,​A,​R> collector)
        Specified by:
        collect in interface org.eclipse.microprofile.reactive.streams.operators.ConsumingOperators<T>
        Specified by:
        collect in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • collect

        public <R> org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<R> collect​(java.util.function.Supplier<R> supplier,
                                                                                                   java.util.function.BiConsumer<R,​? super T> accumulator)
        Specified by:
        collect in interface org.eclipse.microprofile.reactive.streams.operators.ConsumingOperators<T>
        Specified by:
        collect in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • toList

        public org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<java.util.List<T>> toList()
        Specified by:
        toList in interface org.eclipse.microprofile.reactive.streams.operators.ConsumingOperators<T>
        Specified by:
        toList in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • onErrorResume

        public LazyPublisherBuilder<T> onErrorResume​(java.util.function.Function<java.lang.Throwable,​? extends T> errorHandler)
        Specified by:
        onErrorResume in interface org.eclipse.microprofile.reactive.streams.operators.ErrorHandlingOperators<T>
        Specified by:
        onErrorResume in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • onErrorResumeWith

        public LazyPublisherBuilder<T> onErrorResumeWith​(java.util.function.Function<java.lang.Throwable,​? extends org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<? extends T>> errorHandler)
        Specified by:
        onErrorResumeWith in interface org.eclipse.microprofile.reactive.streams.operators.ErrorHandlingOperators<T>
        Specified by:
        onErrorResumeWith in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • onErrorResumeWithRsPublisher

        public LazyPublisherBuilder<T> onErrorResumeWithRsPublisher​(java.util.function.Function<java.lang.Throwable,​? extends org.reactivestreams.Publisher<? extends T>> errorHandler)
        Specified by:
        onErrorResumeWithRsPublisher in interface org.eclipse.microprofile.reactive.streams.operators.ErrorHandlingOperators<T>
        Specified by:
        onErrorResumeWithRsPublisher in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • to

        public org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<java.lang.Void> to​(org.reactivestreams.Subscriber<? super T> subscriber)
        Specified by:
        to in interface org.eclipse.microprofile.reactive.streams.operators.ConnectingOperators<T>
        Specified by:
        to in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • to

        public <R> org.eclipse.microprofile.reactive.streams.operators.CompletionRunner<R> to​(org.eclipse.microprofile.reactive.streams.operators.SubscriberBuilder<? super T,​? extends R> subscriberBuilder)
        Specified by:
        to in interface org.eclipse.microprofile.reactive.streams.operators.ConnectingOperators<T>
        Specified by:
        to in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • via

        public <R> LazyPublisherBuilder<R> via​(org.eclipse.microprofile.reactive.streams.operators.ProcessorBuilder<? super T,​? extends R> processorBuilder)
        Specified by:
        via in interface org.eclipse.microprofile.reactive.streams.operators.ConnectingOperators<T>
        Specified by:
        via in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • via

        public <R> LazyPublisherBuilder<R> via​(org.reactivestreams.Processor<? super T,​? extends R> processor)
        Specified by:
        via in interface org.eclipse.microprofile.reactive.streams.operators.ConnectingOperators<T>
        Specified by:
        via in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • buildRs

        public org.reactivestreams.Publisher<T> buildRs()
        Specified by:
        buildRs in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
      • buildRs

        public org.reactivestreams.Publisher<T> buildRs​(org.eclipse.microprofile.reactive.streams.operators.spi.ReactiveStreamsEngine engine)
        Specified by:
        buildRs in interface org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>