Top Fields Constructors Methods
io.reactivex.internal.observers

public abstract Class BlockingBaseObserver<T>

extends CountDownLatch
implements Observer<T>, Disposable
Class Inheritance
All Implemented Interfaces
io.reactivex.disposables.Disposable, io.reactivex.Observer
Known Direct Subclasses
io.reactivex.internal.observers.BlockingFirstObserver, io.reactivex.internal.observers.BlockingLastObserver
Imports
java.util.concurrent.CountDownLatch, io.reactivex.Observer, io.reactivex.disposables.Disposable, io.reactivex.internal.util.*

Field Summary

Modifier and TypeField and Description
pack-priv volatile boolean
pack-priv Throwable
pack-priv Disposable
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
dispose()

Implements io.reactivex.disposables.Disposable.dispose.

Dispose the resource, the operation should be idempotent.
public final boolean
isDisposed()

Implements io.reactivex.disposables.Disposable.isDisposed.

Returns true if this resource has been disposed.
public final void
onComplete()

Implements io.reactivex.Observer.onComplete.

Notifies the Observer that the Observable has finished sending push-based notifications.
public final void
onSubscribe(Disposable
the Disposable instance whose Disposable#dispose() can be called anytime to cancel the connection
d
)

Implements io.reactivex.Observer.onSubscribe.

Provides the Observer with the means of cancelling (disposing) the connection (channel) with the Observable in both synchronous (from within onNext(Object)) and asynchronous manner.
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 Disposable upstream
valueback to summary
pack-priv T value

Constructor Detail

BlockingBaseObserverback to summary
public BlockingBaseObserver()

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

disposeback to summary
public final void dispose()

Implements io.reactivex.disposables.Disposable.dispose.

Doc from io.reactivex.disposables.Disposable.dispose.

Dispose the resource, the operation should be idempotent.

Annotations
@Override
isDisposedback to summary
public final boolean isDisposed()

Implements io.reactivex.disposables.Disposable.isDisposed.

Doc from io.reactivex.disposables.Disposable.isDisposed.

Returns true if this resource has been disposed.

Returns:boolean

true if this resource has been disposed

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

Implements io.reactivex.Observer.onComplete.

Doc from io.reactivex.Observer.onComplete.

Notifies the Observer that the Observable has finished sending push-based notifications.

The Observable will not call this method if it calls onError.

Annotations
@Override
onSubscribeback to summary
public final void onSubscribe(Disposable d)

Implements io.reactivex.Observer.onSubscribe.

Doc from io.reactivex.Observer.onSubscribe.

Provides the Observer with the means of cancelling (disposing) the connection (channel) with the Observable in both synchronous (from within onNext(Object)) and asynchronous manner.

Parameters
d:Disposable

the Disposable instance whose Disposable#dispose() can be called anytime to cancel the connection

Annotations
@Override