Module io.helidon.common.reactive
Package io.helidon.common.reactive
Class IoMulti.OutputStreamMultiBuilder
- java.lang.Object
-
- io.helidon.common.reactive.IoMulti.OutputStreamMultiBuilder
-
- All Implemented Interfaces:
Builder<OutputStreamMulti>
,Supplier<OutputStreamMulti>
- Enclosing interface:
- IoMulti
public static final class IoMulti.OutputStreamMultiBuilder extends Object implements Builder<OutputStreamMulti>
Fluent API builder forOutputStreamMulti
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OutputStreamMulti
build()
Build the instance from this builder.IoMulti.OutputStreamMultiBuilder
onRequest(BiConsumer<Long,Long> requestCallback)
Callback executed when request signal from downstream arrive.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.
-
-
-
Method Detail
-
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 blockunit
- 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
- param
-
build
public OutputStreamMulti build()
Description copied from interface:Builder
Build the instance from this builder.- Specified by:
build
in interfaceBuilder<OutputStreamMulti>
- Returns:
- instance of the built type
-
-