Top Fields Constructors Methods
io.reactivex.rxjava3.internal.subscribers

public abstract Class BlockingBaseSubscriber<T>

extends CountDownLatch
implements FlowableSubscriber<T>
Class Inheritance
All Implemented Interfaces
io.reactivex.rxjava3.core.FlowableSubscriber, org.reactivestreams.Subscriber
Known Direct Subclasses
io.reactivex.rxjava3.internal.subscribers.BlockingFirstSubscriber, io.reactivex.rxjava3.internal.subscribers.BlockingLastSubscriber
Imports
java.util.concurrent.CountDownLatch, org.reactivestreams.Subscription, io.reactivex.rxjava3.core.FlowableSubscriber, io.reactivex.rxjava3.internal.subscriptions.SubscriptionHelper, io.reactivex.rxjava3.internal.util.*

Field Summary

Modifier and TypeField and Description
pack-priv volatile boolean
pack-priv Throwable
pack-priv Subscription
pack-priv T

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final T

Returns:

the first value or null if the source is empty
blockingGet
()

Block until the first value arrives and return it, otherwise return null for an empty source and rethrow any exception.

public final void
onComplete()

Implements org.reactivestreams.Subscriber.onComplete.

Successful terminal state.
public final void
Inherited from java.util.concurrent.CountDownLatch:
awaitawaitcountDowngetCounttoString

Field Detail

cancelledback to summary
pack-priv volatile boolean cancelled
errorback to summary
pack-priv Throwable error
upstreamback to summary
pack-priv Subscription upstream
valueback to summary
pack-priv T value

Constructor Detail

BlockingBaseSubscriberback to summary
public BlockingBaseSubscriber()

Method Detail

blockingGetback to summary
public final T blockingGet()

Block until the first value arrives and return it, otherwise return null for an empty source and rethrow any exception.

Returns:T

the first value or null if the source is empty

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
onSubscribeback to summary
public final void onSubscribe(Subscription s)

Implements org.reactivestreams.Subscriber.onSubscribe.

Doc from org.reactivestreams.Subscriber.onSubscribe.

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