Package reactor.core

Interface CoreSubscriber<T>

Type Parameters:
T - the Subscriber data type
All Superinterfaces:
Subscriber<T>
All Known Subinterfaces:
Fuseable.ConditionalSubscriber<T>
All Known Implementing Classes:
BaseSubscriber, DirectProcessor, EmitterProcessor, FluxProcessor, MonoProcessor, Operators.MonoSubscriber, ReplayProcessor, UnicastProcessor

public interface CoreSubscriber<T> extends Subscriber<T>
A Context aware subscriber which has relaxed rules for §1.3 and §3.9 compared to the original 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 Details

    • currentContext

      default Context currentContext()
      Request a Context from dependent components which can include downstream operators during subscribing or a terminal Subscriber.
      Returns:
      a resolved context or Context.empty()
    • onSubscribe

      void onSubscribe(Subscription s)
      Implementors should initialize any state used by Subscriber.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 Logger.

      Specified by:
      onSubscribe in interface Subscriber<T>