程序包 | 说明 |
---|---|
reactor.core.publisher |
限定符和类型 | 方法和说明 |
---|---|
static <T,S> Flux<T> |
Flux.generate(java.util.concurrent.Callable<S> stateSupplier,
java.util.function.BiFunction<S,SynchronousSink<T>,S> generator)
Programmatically create a
Flux by generating signals one-by-one via a
consumer callback and some state. |
static <T,S> Flux<T> |
Flux.generate(java.util.concurrent.Callable<S> stateSupplier,
java.util.function.BiFunction<S,SynchronousSink<T>,S> generator,
java.util.function.Consumer<? super S> stateConsumer)
Programmatically create a
Flux by generating signals one-by-one via a
consumer callback and some state, with a final cleanup callback. |
static <T> Flux<T> |
Flux.generate(java.util.function.Consumer<SynchronousSink<T>> generator)
Programmatically create a
Flux by generating signals one-by-one via a
consumer callback. |
<R> Mono<R> |
Mono.handle(java.util.function.BiConsumer<? super T,SynchronousSink<R>> handler)
通过为每个 onNext 调用带有输出接收器的
BiConsumer 来处理此Mono发出的项目,相比与 Mono.map(Function) ,
它可以往Sink里传递 error(Throwable) 或 complete()
Handle the items emitted by this Mono by calling a biconsumer with the
output sink for each onNext. |
<R> Flux<R> |
Flux.handle(java.util.function.BiConsumer<? super T,SynchronousSink<R>> handler)
Handle the items emitted by this
Flux by calling a biconsumer with the
output sink for each onNext. |