Top Description Methods
org.reactivestreams

public Interface Subscriber<T>

Known Direct Subinterfaces
org.reactivestreams.Processor
Known Direct Implementers
org.reactivestreams.FlowAdapters.ReactiveToFlowSubscriber
Type Parameters
<T>
the type of element signaled

Will receive call to onSubscribe(Subscription) once after passing an instance of Subscriber to Publisher#subscribe(Subscriber).

No further notifications will be received until Subscription#request(long) is called.

After signaling demand:

Demand can be signaled via Subscription#request(long) whenever the Subscriber instance is capable of handling more.

Method Summary

Modifier and TypeMethod and Description
public void
onComplete()

Successful terminal state.

public void
onError(Throwable
the throwable signaled
t
)

Failed terminal state.

public void
onNext(T
the element signaled
t
)

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

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

Invoked after calling Publisher#subscribe(Subscriber).

Method Detail

onCompleteback to summary
public void onComplete()

Successful terminal state.

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

onErrorback to summary
public void onError(Throwable t)

Failed terminal state.

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

Parameters
t:Throwable

the throwable signaled

onNextback to summary
public void onNext(T t)

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

Parameters
t:T

the element signaled

onSubscribeback to summary
public void onSubscribe(Subscription s)

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)