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(Observer<? super T>
the actual Observer, not null (not verified) downstream)Construct a SerializedObserver by wrapping the given actual Observer. |
| public | SerializedObserver(Observer<? super T>
the actual Observer, not null (not verified) actual, boolean if true, errors are emitted after regular values have been emitted delayError)Construct a SerializedObserver by wrapping the given actual Observer and optionally delaying the errors till all regular values have been emitted from the internal buffer. |
| Modifier and Type | Method and Description |
|---|---|
| public void | dispose()
Implements io. |
| pack-priv void | |
| public boolean | isDisposed()
Implements io. |
| public void | onComplete()
Implements io. Observable has finished sending push-based notifications.
|
| public void | onError(Throwable
the exception encountered by the Observable t)Implements io. Observable has experienced an error condition.
|
| public void | onNext(T
the item emitted by the Observable t)Implements io. |
| public void | onSubscribe(Disposable
the Disposable instance whose d)Disposable#dispose() can
be called anytime to cancel the connectionImplements io. onNext(Object)) and asynchronous manner.
|
| 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(Observer<? super T> downstream) Construct a SerializedObserver by wrapping the given actual Observer.
| |
| SerializedObserver | back to summary |
|---|---|
| public SerializedObserver(Observer<? super T> actual, boolean delayError) Construct a SerializedObserver by wrapping the given actual Observer and optionally delaying the errors till all regular values have been emitted from the internal buffer.
| |
| 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 Observer that the
The
| |
| onError | back to summary |
|---|---|
| public void onError(Throwable t) Implements io. Doc from io. Notifies the Observer that the
If the | |
| onNext | back to summary |
|---|---|
| public void onNext(T t) Implements io. Doc from io. Provides the Observer with a new item to observe.
The
The
| |
| onSubscribe | back to summary |
|---|---|
| public void onSubscribe(Disposable d) Implements io. Doc from io. Provides the Observer with the means of cancelling (disposing) the
connection (channel) with the Observable in both
synchronous (from within
| |