Class LazyPublisherBuilder<T>

java.lang.Object
io.github.pellse.assembler.microprofile.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 Object implements org.eclipse.microprofile.reactive.streams.operators.PublisherBuilder<T>
  • Method Details

    • lazyPublisherBuilder

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

      public <R> LazyPublisherBuilder<R> map(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(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(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(Function<? super T,? extends 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(Function<? super T,? extends 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(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(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(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(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(Consumer<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(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(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<Void> forEach(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<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<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, 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<Optional<T>> reduce(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<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(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(Supplier<R> supplier, 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<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(Function<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(Function<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(Function<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<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>