程序包 | 说明 |
---|---|
reactor.core.publisher | |
reactor.test |
Main test components supporting the testing and assertion of publishers.
|
reactor.test.subscriber |
Components supporting the creation of test-oriented
Subscribers . |
限定符和类型 | 方法和说明 |
---|---|
static <T> Signal<T> |
Signal.complete()
Creates and returns a
Signal of variety Type.COMPLETE . |
static <T> Signal<T> |
Signal.complete(Context context)
|
static <T> Signal<T> |
Signal.error(java.lang.Throwable e)
Creates and returns a
Signal of variety Type.FAILED , which holds
the error. |
static <T> Signal<T> |
Signal.error(java.lang.Throwable e,
Context context)
Creates and returns a
Signal of variety Type.FAILED , which holds
the error and the Context associated with the erroring source. |
static <T> Signal<T> |
Signal.next(T t)
Creates and returns a
Signal of variety Type.NEXT , which holds
the value. |
static <T> Signal<T> |
Signal.next(T t,
Context context)
Creates and returns a
Signal of variety Type.NEXT , which holds
the value and the Context associated with the emitting source. |
static <T> Signal<T> |
Signal.subscribe(org.reactivestreams.Subscription subscription)
Creates and returns a
Signal of variety Type.ON_SUBSCRIBE . |
static <T> Signal<T> |
Signal.subscribe(org.reactivestreams.Subscription subscription,
Context context)
Creates and returns a
Signal of variety Type.ON_SUBSCRIBE , that
holds the Context associated with the subscribed source. |
限定符和类型 | 方法和说明 |
---|---|
Mono<Signal<T>> |
Mono.materialize()
|
Flux<Signal<T>> |
Flux.materialize()
Transform incoming onNext, onError and onComplete signals into
Signal instances,
materializing these signals. |
限定符和类型 | 方法和说明 |
---|---|
ParallelFlux<T> |
ParallelFlux.doOnEach(java.util.function.Consumer<? super Signal<T>> signalConsumer)
Triggers side-effects when the
ParallelFlux emits an item, fails with an error
or completes successfully. |
Mono<T> |
Mono.doOnEach(java.util.function.Consumer<? super Signal<T>> signalConsumer)
添加当Mono发布、错误失败或成功完成时触发的行为。
|
Flux<T> |
Flux.doOnEach(java.util.function.Consumer<? super Signal<T>> signalConsumer)
Add behavior (side-effects) triggered when the
Flux emits an item, fails with an error
or completes successfully. |
<V> Flux<V> |
Flux.switchOnFirst(java.util.function.BiFunction<Signal<? extends T>,Flux<T>,org.reactivestreams.Publisher<? extends V>> transformer)
Transform the current
Flux once it emits its first element, making a
conditional transformation possible. |
<V> Flux<V> |
Flux.switchOnFirst(java.util.function.BiFunction<Signal<? extends T>,Flux<T>,org.reactivestreams.Publisher<? extends V>> transformer,
boolean cancelSourceOnComplete)
Transform the current
Flux once it emits its first element, making a
conditional transformation possible. |
限定符和类型 | 方法和说明 |
---|---|
static ValueFormatters.Extractor<Signal> |
ValueFormatters.signalExtractor()
|
限定符和类型 | 方法和说明 |
---|---|
Signal<T> |
TestSubscriber.expectTerminalSignal()
|
Signal<T> |
TestSubscriber.getTerminalSignal()
|
限定符和类型 | 方法和说明 |
---|---|
java.util.List<Signal<T>> |
TestSubscriber.getProtocolErrors()
Return a
List of Signal which represent detected protocol error from the source Publisher ,
that is to say signals that were emitted to this TestSubscriber in violation of the Reactive Streams
specification. |