Top Inners Fields Constructors Methods
reactor.core.publisher

pack-priv Class NextProcessor<O>

extends MonoProcessor<O>
implements CoreSubscriber<O>, Disposable, Scannable
Class Inheritance
All Implemented Interfaces
reactor.core.Scannable, reactor.core.Disposable, reactor.core.CoreSubscriber, org.reactivestreams.Subscriber
Annotations
@SuppressWarnings:deprecation
Imports
java.time.Duration, java.util.Objects, java.util.concurrent.CancellationException, java.util.concurrent.atomic.AtomicReferenceFieldUpdater, java.util.stream.Stream, org.reactivestreams.Publisher, .Subscriber, .Subscription, reactor.core.CorePublisher, .CoreSubscriber, .Exceptions, .Scannable, reactor.core.publisher.Sinks.EmissionException, .Sinks.EmitFailureHandler, .Sinks.EmitResult, reactor.util.annotation.Nullable, reactor.util.context.Context

Deprecated

as a consequence of MonoProcessor being deprecated. See corresponding docs for further information.

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv static final NextProcessor.NextInner<T>[]
pack-priv static final NextProcessor.NextInner<T>[]
pack-priv Throwable
pack-priv final boolean
isRefCounted

This boolean indicates a usage as `Mono#share()` where, for alignment with Flux#share(), the removal of all subscribers should lead to the cancellation of the upstream Subscription.

pack-priv CorePublisher<? extends O>
pack-priv volatile NextProcessor.NextInner<O>[]
pack-priv static final AtomicReferenceFieldUpdater<NextProcessor<O>, NextProcessor.NextInner<T>[]>
pack-priv volatile Subscription
pack-priv static final NextProcessor.NextInner<T>[]
pack-priv static final AtomicReferenceFieldUpdater<NextProcessor<O>, Subscription>
pack-priv O

Constructor Summary

AccessConstructor and Description
pack-priv
NextProcessor(CorePublisher<? extends O> source)

pack-priv
NextProcessor(CorePublisher<? extends O> source, boolean isRefCounted)

Method Summary

Modifier and TypeMethod and Description
pack-priv boolean
public O

Returns:

the value of this NextProcessor
block
()

Overrides reactor.core.publisher.MonoProcessor.block.

Block the calling thread indefinitely, waiting for the completion of this NextProcessor.
public O

Returns:

the value of this NextProcessor or null if the timeout is reached and the NextProcessor has not completed
block
(Duration
the timeout value as a Duration
timeout
)

Overrides reactor.core.publisher.MonoProcessor.block.

Block the calling thread for the specified time, waiting for the completion of this NextProcessor.
public void
cancel()

Overrides reactor.core.publisher.MonoProcessor.cancel.

Implements org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.
pack-priv void
public Context
currentContext()

Overrides reactor.core.publisher.MonoProcessor.currentContext.

Overrides default reactor.core.CoreSubscriber.currentContext.

Request a Context from dependent components which can include downstream operators during subscribing or a terminal org.reactivestreams.Subscriber.
public void
dispose()

Overrides reactor.core.publisher.MonoProcessor.dispose.

Implements reactor.core.Disposable.dispose.

Cancel or dispose the underlying task or resource.
pack-priv void
public long

Returns:

the number of active Subscriber or -1 if untracked
downstreamCount
()

Overrides reactor.core.publisher.MonoProcessor.downstreamCount.

Return the number of active Subscriber or -1 if untracked.
pack-priv void
public Throwable

Returns:

the produced Throwable error if any or null
getError
()

Overrides reactor.core.publisher.MonoProcessor.getError.

Return the produced Throwable error if any or null
public Stream<? extends Scannable>
inners()

Overrides reactor.core.publisher.MonoProcessor.inners.

Overrides default reactor.core.Scannable.inners.

Return a Stream of referenced inners (flatmap, multicast etc)
public boolean
isCancelled()

Overrides reactor.core.publisher.MonoProcessor.isCancelled.

Indicates whether this MonoProcessor has been interrupted via cancellation.
public boolean
isDisposed()

Overrides reactor.core.publisher.MonoProcessor.isDisposed.

Overrides default reactor.core.Disposable.isDisposed.

Optionally return true when the resource or task is disposed.
public boolean

Returns:

true if this NextProcessor is successful, false otherwise.
isTerminated
()

Overrides reactor.core.publisher.MonoProcessor.isTerminated.

Indicates whether this NextProcessor has been terminated by the source producer with a success or an error.
public final void
onComplete()

Implements org.reactivestreams.Subscriber.onComplete.

Successful terminal state.
public final void
onError(Throwable
the throwable signaled
cause
)

Implements org.reactivestreams.Subscriber.onError.

Failed terminal state.
public final void
onNext(O
the element signaled
value
)

Implements org.reactivestreams.Subscriber.onNext.

Data notification sent by the Publisher in response to requests to Subscription#request(long).
public final void
onSubscribe(Subscription
the Subscription that allows requesting data via Subscription#request(long)
subscription
)

Implements reactor.core.CoreSubscriber.onSubscribe, org.reactivestreams.Subscriber.onSubscribe.

Implementors should initialize any state used by onNext(Object) before calling Subscription#request(long).
public O

Returns:

the value that completed the NextProcessor, or null if it has not been completed
peek
()

Overrides reactor.core.publisher.MonoProcessor.peek.

For testing purpose.
pack-priv void
public Object
scanUnsafe(Scannable.Attr<T>
a Attr to resolve for the component.
key
)

Overrides reactor.core.publisher.MonoProcessor.scanUnsafe.

Implements reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place.
public void
subscribe(final CoreSubscriber<? super O>
the Subscriber interested into the published sequence
actual
)

Implements abstract reactor.core.publisher.Mono.subscribe.

Implements reactor.core.CorePublisher.subscribe.

An internal Publisher#subscribe(Subscriber) that will bypass Hooks#onLastOperator(Function) pointcut.
pack-priv Sinks.EmitResult
pack-priv Sinks.EmitResult
tryEmitValue(O value)

Inherited from reactor.core.publisher.MonoProcessor:
createhasDownstreamsisErrorisSuccessrequest

Field Detail

EMPTYback to summary
pack-priv static final NextProcessor.NextInner<T>[] EMPTY
Annotations
@SuppressWarnings:rawtypes
EMPTY_WITH_SOURCEback to summary
pack-priv static final NextProcessor.NextInner<T>[] EMPTY_WITH_SOURCE
Annotations
@SuppressWarnings:rawtypes
errorback to summary
pack-priv Throwable error
Annotations
@Nullable
isRefCountedback to summary
pack-priv final boolean isRefCounted

This boolean indicates a usage as `Mono#share()` where, for alignment with Flux#share(), the removal of all subscribers should lead to the cancellation of the upstream Subscription.

sourceback to summary
pack-priv CorePublisher<? extends O> source
Annotations
@Nullable
subscribersback to summary
pack-priv volatile NextProcessor.NextInner<O>[] subscribers
SUBSCRIBERSback to summary
pack-priv static final AtomicReferenceFieldUpdater<NextProcessor<O>, NextProcessor.NextInner<T>[]> SUBSCRIBERS
Annotations
@SuppressWarnings:rawtypes
subscriptionback to summary
pack-priv volatile Subscription subscription
TERMINATEDback to summary
pack-priv static final NextProcessor.NextInner<T>[] TERMINATED
Annotations
@SuppressWarnings:rawtypes
UPSTREAMback to summary
pack-priv static final AtomicReferenceFieldUpdater<NextProcessor<O>, Subscription> UPSTREAM
Annotations
@SuppressWarnings:rawtypes
valueback to summary
pack-priv O value
Annotations
@Nullable

Constructor Detail

NextProcessorback to summary
pack-priv NextProcessor(CorePublisher<? extends O> source)
NextProcessorback to summary
pack-priv NextProcessor(CorePublisher<? extends O> source, boolean isRefCounted)

Method Detail

addback to summary
pack-priv boolean add(NextProcessor.NextInner<O> ps)
blockback to summary
public O block()

Overrides reactor.core.publisher.MonoProcessor.block.

Block the calling thread indefinitely, waiting for the completion of this NextProcessor. If the NextProcessor is completed with an error a RuntimeException that wraps the error is thrown.

Returns:O

the value of this NextProcessor

Annotations
@Override
@Nullable
blockback to summary
public O block(Duration timeout)

Overrides reactor.core.publisher.MonoProcessor.block.

Block the calling thread for the specified time, waiting for the completion of this NextProcessor. If the NextProcessor is completed with an error a RuntimeException that wraps the error is thrown.

Parameters
timeout:Duration

the timeout value as a Duration

Returns:O

the value of this NextProcessor or null if the timeout is reached and the NextProcessor has not completed

Annotations
@Override
@Nullable
cancelback to summary
public void cancel()

Overrides reactor.core.publisher.MonoProcessor.cancel.

Implements org.reactivestreams.Subscription.cancel.

Doc from org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.

Data may still be sent to meet previously signalled demand after calling cancel.

Annotations
@Override
@SuppressWarnings:deprecation
connectback to summary
pack-priv void connect()
currentContextback to summary
public Context currentContext()

Overrides reactor.core.publisher.MonoProcessor.currentContext.

Overrides default reactor.core.CoreSubscriber.currentContext.

Doc from reactor.core.CoreSubscriber.currentContext.

Request a Context from dependent components which can include downstream operators during subscribing or a terminal org.reactivestreams.Subscriber.

Returns:Context

a resolved context or Context#empty()

Annotations
@Override
disposeback to summary
public void dispose()

Overrides reactor.core.publisher.MonoProcessor.dispose.

Implements reactor.core.Disposable.dispose.

Doc from reactor.core.Disposable.dispose.

Cancel or dispose the underlying task or resource.

Implementations are required to make this method idempotent.

Annotations
@Override
@SuppressWarnings:unchecked
doCancelback to summary
pack-priv void doCancel()
downstreamCountback to summary
public long downstreamCount()

Overrides reactor.core.publisher.MonoProcessor.downstreamCount.

Return the number of active Subscriber or -1 if untracked.

Returns:long

the number of active Subscriber or -1 if untracked

Annotations
@Override
emitEmptyback to summary
pack-priv void emitEmpty(Sinks.EmitFailureHandler failureHandler)
getErrorback to summary
public Throwable getError()

Overrides reactor.core.publisher.MonoProcessor.getError.

Return the produced Throwable error if any or null

Returns:Throwable

the produced Throwable error if any or null

Annotations
@Nullable
@Override
innersback to summary
public Stream<? extends Scannable> inners()

Overrides reactor.core.publisher.MonoProcessor.inners.

Overrides default reactor.core.Scannable.inners.

Doc from reactor.core.Scannable.inners.

Return a Stream of referenced inners (flatmap, multicast etc)

Returns:Stream<? extends Scannable>

a Stream of referenced inners (flatmap, multicast etc)

Annotations
@Override
isCancelledback to summary
public boolean isCancelled()

Overrides reactor.core.publisher.MonoProcessor.isCancelled.

Doc from reactor.core.publisher.MonoProcessor.isCancelled.

Indicates whether this MonoProcessor has been interrupted via cancellation.

Returns:boolean

true if this MonoProcessor is cancelled, false otherwise.

Annotations
@Override
@SuppressWarnings:deprecation
isDisposedback to summary
public boolean isDisposed()

Overrides reactor.core.publisher.MonoProcessor.isDisposed.

Overrides default reactor.core.Disposable.isDisposed.

Doc from reactor.core.Disposable.isDisposed.

Optionally return true when the resource or task is disposed.

Implementations are not required to track disposition and as such may never return true even when disposed. However, they MUST only return true when there's a guarantee the resource or task is disposed.

Returns:boolean

true when there's a guarantee the resource or task is disposed.

Annotations
@Override
isTerminatedback to summary
public boolean isTerminated()

Overrides reactor.core.publisher.MonoProcessor.isTerminated.

Indicates whether this NextProcessor has been terminated by the source producer with a success or an error.

Returns:boolean

true if this NextProcessor is successful, false otherwise.

Annotations
@Override
onCompleteback to summary
public final void onComplete()

Implements org.reactivestreams.Subscriber.onComplete.

Doc from org.reactivestreams.Subscriber.onComplete.

Successful terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Annotations
@Override
onErrorback to summary
public final void onError(Throwable cause)

Implements org.reactivestreams.Subscriber.onError.

Doc from org.reactivestreams.Subscriber.onError.

Failed terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Parameters
cause:Throwable

the throwable signaled

Annotations
@Override
onNextback to summary
public final void onNext(O value)

Implements org.reactivestreams.Subscriber.onNext.

Doc from org.reactivestreams.Subscriber.onNext.

Data notification sent by the Publisher in response to requests to Subscription#request(long).

Parameters
value:O

the element signaled

Annotations
@Override
onSubscribeback to summary
public final void onSubscribe(Subscription subscription)

Implements reactor.core.CoreSubscriber.onSubscribe, org.reactivestreams.Subscriber.onSubscribe.

Doc from reactor.core.CoreSubscriber.onSubscribe.

Implementors should initialize any state used by onNext(Object) before calling Subscription#request(long). Should further onNext related state modification occur, thread-safety will be required.

Note that an invalid request <= 0 will not produce an onError and will simply be ignored or reported through a debug-enabled reactor.util.Logger. Invoked after calling Publisher#subscribe(Subscriber).

No data will start flowing until Subscription#request(long) is invoked.

It is the responsibility of this Subscriber instance to call Subscription#request(long) whenever more data is wanted.

The Publisher will send notifications only in response to Subscription#request(long).

Parameters
subscription:Subscription

Doc from org.reactivestreams.Subscriber.onSubscribe.

the Subscription that allows requesting data via Subscription#request(long)

Annotations
@Override
peekback to summary
public O peek()

Overrides reactor.core.publisher.MonoProcessor.peek.

For testing purpose.

Returns the value that completed this NextProcessor. Returns null if the NextProcessor has not been completed. If the NextProcessor is completed with an error a RuntimeException that wraps the error is thrown.

Returns:O

the value that completed the NextProcessor, or null if it has not been completed

Annotations
@Nullable
@Override
Exceptions
RuntimeException:
if the NextProcessor was completed with an error
removeback to summary
pack-priv void remove(NextProcessor.NextInner<O> ps)
Annotations
@SuppressWarnings:unchecked
scanUnsafeback to summary
public Object scanUnsafe(Scannable.Attr<T> key)

Overrides reactor.core.publisher.MonoProcessor.scanUnsafe.

Implements reactor.core.Scannable.scanUnsafe.

Doc from reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place. Although it is ignoring the generic type of the Attr key, implementors should take care to return values of the correct type, and return null if no specific value is available.

For public consumption of attributes, prefer using scan(Attr), which will return a typed value and fall back to the key's default if the component didn't define any mapping.

Parameters
key:Scannable.Attr<T>

a Attr to resolve for the component.

Returns:Object

the value associated to the key for that specific component, or null if none.

Annotations
@Nullable
@Override
subscribeback to summary
public void subscribe(final CoreSubscriber<? super O> actual)

Implements abstract reactor.core.publisher.Mono.subscribe.

Implements reactor.core.CorePublisher.subscribe.

Doc from reactor.core.publisher.Mono.subscribe.

An internal Publisher#subscribe(Subscriber) that will bypass Hooks#onLastOperator(Function) pointcut.

In addition to behave as expected by Publisher#subscribe(Subscriber) in a controlled manner, it supports direct subscribe-time Context passing.

Parameters
actual:CoreSubscriber<? super O>

the Subscriber interested into the published sequence

Annotations
@Override
tryEmitErrorback to summary
pack-priv Sinks.EmitResult tryEmitError(Throwable cause)
Annotations
@SuppressWarnings:unchecked
tryEmitValueback to summary
pack-priv Sinks.EmitResult tryEmitValue(O value)
reactor.core.publisher back to summary

pack-priv final Class NextProcessor.NextInner<T>

extends Operators.MonoSubscriber<T, T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final NextProcessor<T>
parent

Deprecated as a consequence of NextProcessor being deprecated.
Inherited from reactor.core.publisher.Operators.MonoSubscriber:
actualCANCELLEDHAS_REQUEST_HAS_VALUEHAS_REQUEST_NO_VALUENO_REQUEST_HAS_VALUENO_REQUEST_NO_VALUEstateSTATEvalue

Constructor Summary

AccessConstructor and Description
pack-priv
NextInner(CoreSubscriber<? super T> actual, NextProcessor<T> parent)

Deprecated as a consequence of NextProcessor being deprecated.

Method Summary

Modifier and TypeMethod and Description
public void
cancel()

Overrides reactor.core.publisher.Operators.MonoSubscriber.cancel.

Implements org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.
public void
public void
onError(Throwable
the throwable signaled
t
)

Overrides reactor.core.publisher.Operators.MonoSubscriber.onError.

Implements org.reactivestreams.Subscriber.onError.

Failed terminal state.
public Object
scanUnsafe(Scannable.Attr<T>
a Attr to resolve for the component.
key
)

Overrides reactor.core.publisher.Operators.MonoSubscriber.scanUnsafe.

Overrides default reactor.core.publisher.InnerProducer.scanUnsafe.

Implements reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place.
Inherited from reactor.core.publisher.Operators.MonoSubscriber:
actualclearcompletediscardisCancelledisEmptyonNextonSubscribepollrequestrequestFusionsetValuesize

Field Detail

parentback to summary
pack-priv final NextProcessor<T> parent

Deprecated

as a consequence of NextProcessor being deprecated. See corresponding docs for further information.

Constructor Detail

NextInnerback to summary
pack-priv NextInner(CoreSubscriber<? super T> actual, NextProcessor<T> parent)

Deprecated

as a consequence of NextProcessor being deprecated. See corresponding docs for further information.

Method Detail

cancelback to summary
public void cancel()

Overrides reactor.core.publisher.Operators.MonoSubscriber.cancel.

Implements org.reactivestreams.Subscription.cancel.

Doc from org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.

Data may still be sent to meet previously signalled demand after calling cancel.

Annotations
@Override
onCompleteback to summary
public void onComplete()

Overrides reactor.core.publisher.Operators.MonoSubscriber.onComplete.

Implements org.reactivestreams.Subscriber.onComplete.

Doc from org.reactivestreams.Subscriber.onComplete.

Successful terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Annotations
@Override
onErrorback to summary
public void onError(Throwable t)

Overrides reactor.core.publisher.Operators.MonoSubscriber.onError.

Implements org.reactivestreams.Subscriber.onError.

Doc from org.reactivestreams.Subscriber.onError.

Failed terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Parameters
t:Throwable

the throwable signaled

Annotations
@Override
scanUnsafeback to summary
public Object scanUnsafe(Scannable.Attr<T> key)

Overrides reactor.core.publisher.Operators.MonoSubscriber.scanUnsafe.

Overrides default reactor.core.publisher.InnerProducer.scanUnsafe.

Implements reactor.core.Scannable.scanUnsafe.

Doc from reactor.core.Scannable.scanUnsafe.

This method is used internally by components to define their key-value mappings in a single place. Although it is ignoring the generic type of the Attr key, implementors should take care to return values of the correct type, and return null if no specific value is available.

For public consumption of attributes, prefer using scan(Attr), which will return a typed value and fall back to the key's default if the component didn't define any mapping.

Parameters
key:Scannable.Attr<T>

a Attr to resolve for the component.

Returns:Object

the value associated to the key for that specific component, or null if none.

Annotations
@Override