Observer#onNext(Object), Observer#onError(Throwable) and
Observer#onComplete() methods of another Observer.
Note that onSubscribe(Disposable) is not serialized in respect of the other methods so
make sure the onSubscribe() is called with a non-null Disposable
before any of the other methods are called.
The implementation assumes that the actual Observer's methods don't throw.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final boolean | |
| pack-priv volatile boolean | |
| pack-priv final Observer | |
| pack-priv boolean | |
| pack-priv AppendOnlyLinkedArrayList | |
| pack-priv static final int | |
| pack-priv Disposable |
| Access | Constructor and Description |
|---|---|
| public | SerializedObserver(@NonNull Observer<? super T>
the actual downstream)Observer, not null (not verified)Construct a |
| public | SerializedObserver(@NonNull Observer<? super T>
the actual actual, boolean Observer, not null (not verified)if delayError)true, errors are emitted after regular values have been emittedConstruct a SerializedObserver by wrapping the given actual |
| Modifier and Type | Method and Description |
|---|---|
| public void | dispose()
Implements io. |
| pack-priv void | |
| public boolean | isDisposed()
Implements io. |
| public void | onComplete()
Implements io. Observer that the Observable has finished sending push-based notifications.
|
| public void | |
| public void | onNext(T
the item emitted by the Observable t)Implements io. Observer with a new item to observe.
|
| public void |
| delayError | back to summary |
|---|---|
| pack-priv final boolean delayError | |
| done | back to summary |
|---|---|
| pack-priv volatile boolean done | |
| downstream | back to summary |
|---|---|
| pack-priv final Observer<? super T> downstream | |
| emitting | back to summary |
|---|---|
| pack-priv boolean emitting | |
| queue | back to summary |
|---|---|
| pack-priv AppendOnlyLinkedArrayList<Object> queue | |
| QUEUE_LINK_SIZE | back to summary |
|---|---|
| pack-priv static final int QUEUE_LINK_SIZE | |
| upstream | back to summary |
|---|---|
| pack-priv Disposable upstream | |
| SerializedObserver | back to summary |
|---|---|
| public SerializedObserver(@NonNull Observer<? super T> downstream) Construct a | |
| SerializedObserver | back to summary |
|---|---|
| public SerializedObserver(@NonNull Observer<? super T> actual, boolean delayError) Construct a SerializedObserver by wrapping the given actual | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements io. Doc from io. Dispose the resource, the operation should be idempotent.
| |
| emitLoop | back to summary |
|---|---|
| pack-priv void emitLoop() | |
| isDisposed | back to summary |
|---|---|
| public boolean isDisposed() Implements io. Doc from io. Returns true if this resource has been disposed.
| |
| onComplete | back to summary |
|---|---|
| public void onComplete() Implements io. Doc from io. Notifies the
The
| |
| onError | back to summary |
|---|---|
public void onError(@NonNull Throwable t)
| |
| onNext | back to summary |
|---|---|
| public void onNext(T t) Implements io. Doc from io. Provides the
The
The
| |
| onSubscribe | back to summary |
|---|---|
public void onSubscribe(@NonNull Disposable d)
| |