程序包 | 说明 |
---|---|
reactor.core |
Core components of the framework supporting extensions to the Reactive Stream
programming model.
|
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 interface |
Fuseable.ConditionalSubscriber<T>
A subscriber variant that can immediately tell if it consumed
the value or not, directly allowing a new value to be sent if
it didn't.
|
限定符和类型 | 方法和说明 |
---|---|
void |
CorePublisher.subscribe(CoreSubscriber<? super T> subscriber)
An internal
Publisher.subscribe(Subscriber) that will bypass
Hooks.onLastOperator(Function) pointcut. |
限定符和类型 | 类和说明 |
---|---|
class |
BaseSubscriber<T>
A simple base class for a
Subscriber implementation that lets the user
perform a BaseSubscriber.request(long) and BaseSubscriber.cancel() on it directly. |
class |
ConditionalStressSubscriber<T> |
class |
DirectProcessor<T>
已过时。
To be removed in 3.5, prefer clear cut usage of
Sinks . Closest sink
is Sinks.many().multicast().directBestEffort() ,
except it doesn't terminate overflowing downstreams. |
class |
EmitterProcessor<T>
已过时。
To be removed in 3.5. Prefer clear cut usage of
Sinks through
variations of Sinks.many().multicast().onBackpressureBuffer() .
If you really need the subscribe-to-upstream functionality of a Processor , switch
to Sinks.ManyWithUpstream with Sinks.unsafe() variants of Sinks.unsafe().manyWithUpstream() .
This processor was blocking in EmitterProcessor.onNext(Object) . This behaviour can be implemented with the Sinks API by calling
Sinks.Many.tryEmitNext(Object) and retrying, e.g.:
|
class |
FluxProcessor<IN,OUT>
已过时。
Processors will be removed in 3.5. Prefer using
Sinks.Many instead,
or see https://github.com/reactor/reactor-core/issues/2431 for alternatives |
class |
InnerStressSubscriber<T> |
class |
MonoProcessor<O>
已过时。
Processors will be removed in 3.5. Prefer using
Sinks.One or Sinks.Empty instead,
or see https://github.com/reactor/reactor-core/issues/2431 for alternatives |
class |
ReplayProcessor<T>
已过时。
To be removed in 3.5, prefer clear cut usage of
Sinks through
variations under Sinks.many().replay() . |
class |
StressSubscriber<T> |
class |
UnicastProcessor<T>
已过时。
to be removed in 3.5, prefer clear cut usage of
Sinks through
variations under Sinks.many().unicast() . |
限定符和类型 | 方法和说明 |
---|---|
CoreSubscriber<? super T> |
UnicastProcessor.actual()
已过时。
|
CoreSubscriber<? super O> |
Operators.MonoSubscriber.actual() |
static <T> CoreSubscriber<T> |
Operators.drainSubscriber()
Return a singleton
Subscriber that does not check for double onSubscribe
and purely request Long.MAX. |
static <T> CoreSubscriber<T> |
Operators.emptySubscriber()
A
Subscriber that is expected to be used as a placeholder and
never actually be called. |
static <T> CoreSubscriber<T> |
Operators.serialize(CoreSubscriber<? super T> subscriber)
Safely gate a
Subscriber by making sure onNext signals are delivered
sequentially (serialized). |
static <T> CoreSubscriber<? super T> |
Operators.toCoreSubscriber(org.reactivestreams.Subscriber<? super T> actual)
If the actual
Subscriber is not a CoreSubscriber , it will apply
safe strict wrapping to apply all reactive streams rules including the ones
relaxed by internal operators based on CoreSubscriber . |
限定符和类型 | 方法和说明 |
---|---|
static void |
Operators.reportThrowInSubscribe(CoreSubscriber<?> subscriber,
java.lang.Throwable e)
Report a
Throwable that was thrown from a call to Publisher.subscribe(Subscriber) ,
attempting to notify the Subscriber by:
providing a special Subscription via Subscriber.onSubscribe(Subscription)
immediately delivering an onError signal after that
As at that point the subscriber MAY have already been provided with a Subscription , we
assume most well formed subscribers will ignore this second Subscription per Reactive
Streams rule 1.9. |
static <T> org.reactivestreams.Subscription |
Operators.scalarSubscription(CoreSubscriber<? super T> subscriber,
T value)
Represents a fuseable Subscription that emits a single constant value synchronously
to a Subscriber or consumer.
|
static <T> org.reactivestreams.Subscription |
Operators.scalarSubscription(CoreSubscriber<? super T> subscriber,
T value,
java.lang.String stepName)
Represents a fuseable Subscription that emits a single constant value synchronously
to a Subscriber or consumer.
|
static <T> CoreSubscriber<T> |
Operators.serialize(CoreSubscriber<? super T> subscriber)
Safely gate a
Subscriber by making sure onNext signals are delivered
sequentially (serialized). |
void |
ParallelFlux.subscribe(CoreSubscriber<? super T> s) |
void |
EmitterProcessor.subscribe(CoreSubscriber<? super T> actual)
已过时。
|
void |
ReplayProcessor.subscribe(CoreSubscriber<? super T> actual)
已过时。
|
void |
UnicastProcessor.subscribe(CoreSubscriber<? super T> actual)
已过时。
|
void |
DirectProcessor.subscribe(CoreSubscriber<? super T> actual)
已过时。
|
abstract void |
Mono.subscribe(CoreSubscriber<? super T> actual)
An internal
Publisher.subscribe(Subscriber) that will bypass
Hooks.onLastOperator(Function) pointcut. |
abstract void |
Flux.subscribe(CoreSubscriber<? super T> actual)
An internal
Publisher.subscribe(Subscriber) that will bypass
Hooks.onLastOperator(Function) pointcut. |
abstract void |
ParallelFlux.subscribe(CoreSubscriber<? super T>[] subscribers)
Subscribes an array of Subscribers to this
ParallelFlux and triggers the
execution chain for all 'rails'. |
static <T> Fuseable.ConditionalSubscriber<? super T> |
Operators.toConditionalSubscriber(CoreSubscriber<? super T> actual)
If the actual
CoreSubscriber is not Fuseable.ConditionalSubscriber ,
it will apply an adapter which directly maps all
Fuseable.ConditionalSubscriber.tryOnNext(Object) to
Subscriber.onNext(Object)
and always returns true as the result |
限定符和类型 | 方法和说明 |
---|---|
static <I,O> java.util.function.Function<? super org.reactivestreams.Publisher<I>,? extends org.reactivestreams.Publisher<O>> |
Operators.lift(java.util.function.BiFunction<Scannable,? super CoreSubscriber<? super O>,? extends CoreSubscriber<? super I>> lifter)
Create a function that can be used to support a custom operator via
CoreSubscriber decoration. |
static <I,O> java.util.function.Function<? super org.reactivestreams.Publisher<I>,? extends org.reactivestreams.Publisher<O>> |
Operators.lift(java.util.function.BiFunction<Scannable,? super CoreSubscriber<? super O>,? extends CoreSubscriber<? super I>> lifter)
Create a function that can be used to support a custom operator via
CoreSubscriber decoration. |
static <O> java.util.function.Function<? super org.reactivestreams.Publisher<O>,? extends org.reactivestreams.Publisher<O>> |
Operators.lift(java.util.function.Predicate<Scannable> filter,
java.util.function.BiFunction<Scannable,? super CoreSubscriber<? super O>,? extends CoreSubscriber<? super O>> lifter)
Create a function that can be used to support a custom operator via
CoreSubscriber decoration. |
static <O> java.util.function.Function<? super org.reactivestreams.Publisher<O>,? extends org.reactivestreams.Publisher<O>> |
Operators.lift(java.util.function.Predicate<Scannable> filter,
java.util.function.BiFunction<Scannable,? super CoreSubscriber<? super O>,? extends CoreSubscriber<? super O>> lifter)
Create a function that can be used to support a custom operator via
CoreSubscriber decoration. |
static <I,O> java.util.function.Function<? super org.reactivestreams.Publisher<I>,? extends org.reactivestreams.Publisher<O>> |
Operators.liftPublisher(java.util.function.BiFunction<org.reactivestreams.Publisher,? super CoreSubscriber<? super O>,? extends CoreSubscriber<? super I>> lifter)
Create a function that can be used to support a custom operator via
CoreSubscriber decoration. |
static <I,O> java.util.function.Function<? super org.reactivestreams.Publisher<I>,? extends org.reactivestreams.Publisher<O>> |
Operators.liftPublisher(java.util.function.BiFunction<org.reactivestreams.Publisher,? super CoreSubscriber<? super O>,? extends CoreSubscriber<? super I>> lifter)
Create a function that can be used to support a custom operator via
CoreSubscriber decoration. |
static <O> java.util.function.Function<? super org.reactivestreams.Publisher<O>,? extends org.reactivestreams.Publisher<O>> |
Operators.liftPublisher(java.util.function.Predicate<org.reactivestreams.Publisher> filter,
java.util.function.BiFunction<org.reactivestreams.Publisher,? super CoreSubscriber<? super O>,? extends CoreSubscriber<? super O>> lifter)
Create a function that can be used to support a custom operator via
CoreSubscriber decoration. |
static <O> java.util.function.Function<? super org.reactivestreams.Publisher<O>,? extends org.reactivestreams.Publisher<O>> |
Operators.liftPublisher(java.util.function.Predicate<org.reactivestreams.Publisher> filter,
java.util.function.BiFunction<org.reactivestreams.Publisher,? super CoreSubscriber<? super O>,? extends CoreSubscriber<? super O>> lifter)
Create a function that can be used to support a custom operator via
CoreSubscriber decoration. |
构造器和说明 |
---|
MonoSubscriber(CoreSubscriber<? super O> actual) |
StressSubscription(CoreSubscriber<? super T> actual) |
限定符和类型 | 接口和说明 |
---|---|
static interface |
MockUtils.TestScannableConditionalSubscriber<T>
An interface that can be used to mock a
Scannable
Fuseable.ConditionalSubscriber . |
限定符和类型 | 接口和说明 |
---|---|
interface |
ConditionalTestSubscriber<T>
Simple interface for a
Fuseable.ConditionalSubscriber variant of the
TestSubscriber . |
interface |
TestSubscriber<T>
A
CoreSubscriber that can be attached to any Publisher to later assert which
events occurred at runtime. |
限定符和类型 | 类和说明 |
---|---|
class |
AssertSubscriber<T>
A Subscriber implementation that hosts assertion tests for its state and allows
asynchronous cancellation and requesting.
|