Class IoMulti.OutputStreamMultiBuilder

java.lang.Object
io.helidon.common.reactive.IoMulti.OutputStreamMultiBuilder
All Implemented Interfaces:
Builder<IoMulti.OutputStreamMultiBuilder,OutputStreamMulti>, Supplier<OutputStreamMulti>
Enclosing interface:
IoMulti

public static final class IoMulti.OutputStreamMultiBuilder extends Object implements Builder<IoMulti.OutputStreamMultiBuilder,OutputStreamMulti>
Fluent API builder for OutputStreamMulti.
  • Method Details

    • timeout

      public IoMulti.OutputStreamMultiBuilder timeout(long timeout, TimeUnit unit)
      Set max timeout for which is allowed to block write methods, in case there is no demand from downstream.
      Parameters:
      timeout - the maximum time to block
      unit - the time unit of the timeout argument
      Returns:
      this builder
    • onRequest

      public IoMulti.OutputStreamMultiBuilder onRequest(BiConsumer<Long,Long> requestCallback)
      Callback executed when request signal from downstream arrive.
      • param n the requested count.
      • param demand the current total cumulative requested count, ranges between [0, Long.MAX_VALUE] where the max indicates that this publisher is unbounded.
      Parameters:
      requestCallback - to be executed
      Returns:
      this builder
    • build

      public OutputStreamMulti build()
      Description copied from interface: Builder
      Build the instance from this builder.
      Specified by:
      build in interface Builder<IoMulti.OutputStreamMultiBuilder,OutputStreamMulti>
      Returns:
      instance of the built type