All other Observable and Subject methods are thread-safe by design.
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Subject | actual
The actual subscriber to serialize Subscriber calls to. |
| pack-priv volatile boolean | done
Indicates a terminal event has been received and all further events will be dropped. |
| pack-priv boolean | emitting
Indicates an emission is going on, guarded by this. |
| pack-priv AppendOnlyLinkedArrayList | queue
If not null, it holds the missed NotificationLite events. |
| Access | Constructor and Description |
|---|---|
| pack-priv | SerializedSubject(final Subject<T>
the subject wrapped actual)Constructor that wraps an actual subject. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | |
| public Throwable | getThrowable()
Implements abstract io. |
| public boolean | hasComplete()
Implements abstract io. |
| public boolean | hasObservers()
Implements abstract io. |
| public boolean | hasThrowable()
Implements abstract 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.
|
| protected void | subscribeActual(Observer<? super T>
the incoming Observer, never null observer)Implements abstract io. Observers.
|
| public boolean | test(Object
the value o)Implements io. |
| actual | back to summary |
|---|---|
| pack-priv final Subject<T> actual The actual subscriber to serialize Subscriber calls to. | |
| done | back to summary |
|---|---|
| pack-priv volatile boolean done Indicates a terminal event has been received and all further events will be dropped. | |
| emitting | back to summary |
|---|---|
| pack-priv boolean emitting Indicates an emission is going on, guarded by this. | |
| queue | back to summary |
|---|---|
| pack-priv AppendOnlyLinkedArrayList<Object> queue If not null, it holds the missed NotificationLite events. | |
| SerializedSubject | back to summary |
|---|---|
| pack-priv SerializedSubject(final Subject<T> actual) Constructor that wraps an actual subject.
| |
| emitLoop | back to summary |
|---|---|
| pack-priv void emitLoop() Loops until all notifications in the queue has been processed. | |
| getThrowable | back to summary |
|---|---|
| public Throwable getThrowable() Implements abstract io. Doc from io. Returns the error that caused the Subject to terminate or null if the Subject hasn't terminated yet. The method is thread-safe. | |
| hasComplete | back to summary |
|---|---|
| public boolean hasComplete() Implements abstract io. Doc from io. Returns true if the subject has reached a terminal state through a complete event. The method is thread-safe.
| |
| hasObservers | back to summary |
|---|---|
| public boolean hasObservers() Implements abstract io. Doc from io. Returns true if the subject has any Observers. The method is thread-safe.
| |
| hasThrowable | back to summary |
|---|---|
| public boolean hasThrowable() Implements abstract io. Doc from io. Returns true if the subject has reached a terminal state through an error event. The method is thread-safe.
| |
| 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
| |
| subscribeActual | back to summary |
|---|---|
| protected void subscribeActual(Observer<? super T> observer) Implements abstract io. Doc from io. Operator implementations (both source and intermediate) should implement this method that
performs the necessary business logic and handles the incoming There is no need to call any of the plugin hooks on the current | |
| test | back to summary |
|---|---|
| public boolean test(Object o) Implements io. Doc from io. Test the given input value and return a boolean. | |