Top Description Methods
reactor.core

public Interface CoreSubscriber<T>

extends Subscriber<T>
Known Direct Subinterfaces
reactor.core.Fuseable.ConditionalSubscriber, reactor.core.publisher.InnerConsumer
Known Direct Implementers
reactor.core.publisher.BaseSubscriber, reactor.core.publisher.MonoToCompletableFuture, reactor.core.publisher.NextProcessor, reactor.core.publisher.Operators.DrainSubscriber, reactor.core.publisher.FluxProcessor, reactor.core.publisher.FluxSwitchOnFirst.SwitchOnFirstControlSubscriber, reactor.core.publisher.MonoProcessor, reactor.core.publisher.SinkManyEmitterProcessor, reactor.core.publisher.SinkManyReplayProcessor, reactor.core.publisher.StrictSubscriber, reactor.adapter.JdkFlowAdapter.FlowSubscriber
Type Parameters
<T>
the Subscriber data type
Imports
org.reactivestreams.Subscriber, .Subscription, reactor.util.context.Context

A Context aware subscriber which has relaxed rules for §1.3 and §3.9 compared to the original org.reactivestreams.Subscriber from Reactive Streams. If an invalid request <= 0 is done on the received subscription, the request will not produce an onError and will simply be ignored.

The rule relaxation has been initially established under reactive-streams-commons.

Since
3.1.0

Method Summary

Modifier and TypeMethod and Description
public default Context

Returns:

a resolved context or Context#empty()
currentContext
()

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

public void
onSubscribe(Subscription
the Subscription that allows requesting data via Subscription#request(long)
s
)

Redeclares org.reactivestreams.Subscriber.onSubscribe.

Implementors should initialize any state used by onNext(Object) before calling Subscription#request(long).
Inherited from org.reactivestreams.Subscriber:
onCompleteonErroronNext

Method Detail

currentContextback to summary
public default Context 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()

onSubscribeback to summary
public void onSubscribe(Subscription s)

Redeclares org.reactivestreams.Subscriber.onSubscribe.

Doc from org.reactivestreams.Subscriber.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
s:Subscription

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

Annotations
@Override