程序包 | 说明 |
---|---|
reactor.core |
Core components of the framework supporting extensions to the Reactive Stream
programming model.
|
reactor.core.observability | |
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 . |
reactor.util.context |
Miscellaneous utility classes, such as loggers, tuples or queue suppliers and implementations.
|
限定符和类型 | 方法和说明 |
---|---|
default Context |
CoreSubscriber.currentContext()
Request a
Context from dependent components which can include downstream
operators during subscribing or a terminal Subscriber . |
限定符和类型 | 方法和说明 |
---|---|
default Context |
SignalListener.addToContext(Context originalContext)
In some cases, the tap operation should alter the
Context exposed by the operator in order to store additional
data. |
限定符和类型 | 方法和说明 |
---|---|
default Context |
SignalListener.addToContext(Context originalContext)
In some cases, the tap operation should alter the
Context exposed by the operator in order to store additional
data. |
限定符和类型 | 方法和说明 |
---|---|
Context |
MonoProcessor.currentContext()
已过时。
|
Context |
SynchronousSink.currentContext()
已过时。
To be removed in 3.6.0 at the earliest. Prefer using #getContextView() instead.
|
Context |
FluxProcessor.currentContext()
已过时。
|
Context |
EmitterProcessor.currentContext()
已过时。
|
Context |
ReplayProcessor.currentContext()
已过时。
|
Context |
UnicastProcessor.currentContext()
已过时。
|
Context |
DirectProcessor.currentContext()
已过时。
|
Context |
FluxSink.currentContext()
已过时。
To be removed in 3.6.0 at the earliest. Prefer using #getContextView() instead.
|
Context |
StressSubscriber.currentContext() |
Context |
MonoSink.currentContext()
已过时。
To be removed in 3.6.0 at the earliest. Prefer using #getContextView() instead.
|
static Context |
Operators.enableOnDiscard(Context target,
java.util.function.Consumer<?> discardConsumer)
Utility method to activate the onDiscard feature (see
Flux.doOnDiscard(Class, Consumer) )
in a target Context . |
限定符和类型 | 方法和说明 |
---|---|
static <T> Signal<T> |
Signal.complete(Context context)
|
static Context |
Operators.enableOnDiscard(Context target,
java.util.function.Consumer<?> discardConsumer)
Utility method to activate the onDiscard feature (see
Flux.doOnDiscard(Class, Consumer) )
in a target Context . |
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,
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> void |
Operators.onDiscard(T element,
Context context)
Invoke a (local or global) hook that processes elements that get discarded.
|
static void |
Operators.onDiscardMultiple(java.util.Collection<?> multiple,
Context context)
Invoke a (local or global) hook that processes elements that get discarded en masse.
|
static void |
Operators.onDiscardMultiple(java.util.Iterator<?> multiple,
boolean knownToBeFinite,
Context context)
Invoke a (local or global) hook that processes elements that remains in an
Iterator . |
static void |
Operators.onDiscardMultiple(java.util.stream.Stream<?> multiple,
Context context)
Invoke a (local or global) hook that processes elements that get discarded en masse.
|
static <T> void |
Operators.onDiscardQueueWithClear(java.util.Queue<T> queue,
Context context,
java.util.function.Function<T,java.util.stream.Stream<?>> extract)
Invoke a (local or global) hook that processes elements that get discarded
en masse after having been enqueued, due to cancellation or error.
|
static void |
Operators.onErrorDropped(java.lang.Throwable e,
Context context)
An unexpected exception is about to be dropped.
|
static <T> void |
Operators.onNextDropped(T t,
Context context)
An unexpected event is about to be dropped.
|
static <T> java.lang.Throwable |
Operators.onNextError(T value,
java.lang.Throwable error,
Context context)
Find the
OnNextFailureStrategy to apply to the calling async operator (which could be
a local error mode defined in the Context ) and apply it. |
static <T> java.lang.Throwable |
Operators.onNextError(T value,
java.lang.Throwable error,
Context context,
org.reactivestreams.Subscription subscriptionForCancel)
Find the
OnNextFailureStrategy to apply to the calling operator (which could be a local
error mode defined in the Context ) and apply it. |
static java.util.function.BiFunction<? super java.lang.Throwable,java.lang.Object,? extends java.lang.Throwable> |
Operators.onNextErrorFunction(Context context) |
static <T> java.lang.Throwable |
Operators.onNextInnerError(java.lang.Throwable error,
Context context,
org.reactivestreams.Subscription subscriptionForCancel)
Find the
OnNextFailureStrategy to apply to the calling operator (which could be a local
error mode defined in the Context ) and apply it. |
static <T> java.lang.RuntimeException |
Operators.onNextPollError(T value,
java.lang.Throwable error,
Context context)
Find the
OnNextFailureStrategy to apply to the calling async operator (which could be
a local error mode defined in the Context ) and apply it. |
static java.lang.Throwable |
Operators.onOperatorError(org.reactivestreams.Subscription subscription,
java.lang.Throwable error,
Context context)
Map an "operator" error given an operator parent
Subscription . |
static java.lang.Throwable |
Operators.onOperatorError(org.reactivestreams.Subscription subscription,
java.lang.Throwable error,
java.lang.Object dataSignal,
Context context)
Map an "operator" error given an operator parent
Subscription . |
static java.lang.Throwable |
Operators.onOperatorError(java.lang.Throwable error,
Context context)
Map an "operator" error.
|
static java.lang.RuntimeException |
Operators.onRejectedExecution(java.lang.Throwable original,
Context context)
Return a wrapped
RejectedExecutionException which can be thrown by the
operator. |
static java.lang.RuntimeException |
Operators.onRejectedExecution(java.lang.Throwable original,
org.reactivestreams.Subscription subscription,
java.lang.Throwable suppressed,
java.lang.Object dataSignal,
Context context)
Return a wrapped
RejectedExecutionException which can be thrown by the
operator. |
Disposable |
ParallelFlux.subscribe(java.util.function.Consumer<? super T> onNext,
java.util.function.Consumer<? super java.lang.Throwable> onError,
java.lang.Runnable onComplete,
Context initialContext)
Subscribes to this
ParallelFlux by providing an onNext, onError and
onComplete callback as well as an initial Context , then trigger the execution chain for all
'rails'. |
Disposable |
Mono.subscribe(java.util.function.Consumer<? super T> consumer,
java.util.function.Consumer<? super java.lang.Throwable> errorConsumer,
java.lang.Runnable completeConsumer,
Context initialContext)
Subscribe
Consumer to this Mono that will respectively consume all the
elements in the sequence, handle errors and react to completion. |
Disposable |
Flux.subscribe(java.util.function.Consumer<? super T> consumer,
java.util.function.Consumer<? super java.lang.Throwable> errorConsumer,
java.lang.Runnable completeConsumer,
Context initialContext)
Subscribe
Consumer to this Flux that will respectively consume all the
elements in the sequence, handle errors and react to completion. |
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<T> |
Mono.contextWrite(java.util.function.Function<Context,Context> contextModifier)
|
Mono<T> |
Mono.contextWrite(java.util.function.Function<Context,Context> contextModifier)
|
Flux<T> |
Flux.contextWrite(java.util.function.Function<Context,Context> contextModifier)
|
Flux<T> |
Flux.contextWrite(java.util.function.Function<Context,Context> contextModifier)
|
限定符和类型 | 方法和说明 |
---|---|
Context |
StepVerifierOptions.getInitialContext() |
限定符和类型 | 方法和说明 |
---|---|
StepVerifier.ContextExpectations<T> |
StepVerifier.ContextExpectations.containsAllOf(Context other)
|
StepVerifier.ContextExpectations<T> |
StepVerifier.ContextExpectations.containsOnly(Context other)
|
StepVerifierOptions |
StepVerifierOptions.withInitialContext(Context context)
Set an initial
Context to be propagated by the StepVerifier when it
subscribes to the sequence under test. |
限定符和类型 | 方法和说明 |
---|---|
StepVerifier.ContextExpectations<T> |
StepVerifier.ContextExpectations.assertThat(java.util.function.Consumer<Context> assertingConsumer)
Apply custom assertions to the propagated
Context . |
StepVerifier.ContextExpectations<T> |
StepVerifier.ContextExpectations.matches(java.util.function.Predicate<Context> predicate)
Check that the propagated
Context matches a given Predicate . |
StepVerifier.ContextExpectations<T> |
StepVerifier.ContextExpectations.matches(java.util.function.Predicate<Context> predicate,
java.lang.String description)
Check that the propagated
Context matches a given Predicate
that is given a description. |
限定符和类型 | 方法和说明 |
---|---|
Context |
AssertSubscriber.currentContext() |
构造器和说明 |
---|
AssertSubscriber(Context context) |
AssertSubscriber(Context context,
long n) |
限定符和类型 | 方法和说明 |
---|---|
Context |
Context.delete(java.lang.Object key)
Return a new
Context that will resolve all existing keys except the
removed one, key . |
static Context |
Context.empty()
Return an empty
Context |
static Context |
Context.of(ContextView contextView)
Create a
Context out of a ContextView , enabling write API on top of
the read-only view. |
static Context |
Context.of(java.util.Map<?,?> map)
Create a
Context out of a Map . |
static Context |
Context.of(java.lang.Object key,
java.lang.Object value)
Create a
Context pre-initialized with one key-value pair. |
static Context |
Context.of(java.lang.Object key1,
java.lang.Object value1,
java.lang.Object key2,
java.lang.Object value2)
Create a
Context pre-initialized with two key-value pairs. |
static Context |
Context.of(java.lang.Object key1,
java.lang.Object value1,
java.lang.Object key2,
java.lang.Object value2,
java.lang.Object key3,
java.lang.Object value3)
Create a
Context pre-initialized with three key-value pairs. |
static Context |
Context.of(java.lang.Object key1,
java.lang.Object value1,
java.lang.Object key2,
java.lang.Object value2,
java.lang.Object key3,
java.lang.Object value3,
java.lang.Object key4,
java.lang.Object value4)
Create a
Context pre-initialized with four key-value pairs. |
static Context |
Context.of(java.lang.Object key1,
java.lang.Object value1,
java.lang.Object key2,
java.lang.Object value2,
java.lang.Object key3,
java.lang.Object value3,
java.lang.Object key4,
java.lang.Object value4,
java.lang.Object key5,
java.lang.Object value5)
Create a
Context pre-initialized with five key-value pairs. |
Context |
Context.put(java.lang.Object key,
java.lang.Object value)
Create a new
Context that contains all current key/value pairs plus the
given key/value pair. |
default Context |
Context.putAll(Context context)
已过时。
will be removed in 3.5, kept for backward compatibility with 3.3. Until
then if you need to work around the deprecation, use
putAll(ContextView)
combined with readOnly() |
default Context |
Context.putAll(ContextView other)
Create a new
Context by merging the content of this context and a given
ContextView . |
default Context |
Context.putAllMap(java.util.Map<?,?> from)
Create a new
Context by merging the content of this context and a given
Map . |
default Context |
Context.putNonNull(java.lang.Object key,
java.lang.Object valueOrNull)
Create a new
Context that contains all current key/value pairs plus the
given key/value pair only if the value is not null. |
Context |
ReactorContextAccessor.writeValues(java.util.Map<java.lang.Object,java.lang.Object> source,
Context target) |
限定符和类型 | 方法和说明 |
---|---|
java.lang.Class<? extends Context> |
ReactorContextAccessor.writeableType() |
限定符和类型 | 方法和说明 |
---|---|
default Context |
Context.putAll(Context context)
已过时。
will be removed in 3.5, kept for backward compatibility with 3.3. Until
then if you need to work around the deprecation, use
putAll(ContextView)
combined with readOnly() |
Context |
ReactorContextAccessor.writeValues(java.util.Map<java.lang.Object,java.lang.Object> source,
Context target) |