| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | ObservablePublish.InnerDisposable<
the value type T>A Disposable that manages the request and disposed state of a child Observer in thread-safe manner. |
| pack-priv static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final AtomicReference | current
Holds the current subscriber that is, will be or just was subscribed to the source observable. |
| pack-priv final ObservableSource | |
| pack-priv final ObservableSource | source
The source observable. |
| Access | Constructor and Description |
|---|---|
| private | ObservablePublish(ObservableSource<T> onSubscribe, ObservableSource<T> source, final AtomicReference<ObservablePublish.
|
| Modifier and Type | Method and Description |
|---|---|
| public void | connect(Consumer<? super Disposable>
the action that receives the connection subscription before the subscription to source happens
allowing the caller to synchronously disconnect a synchronous source connection)Implements abstract io. ConnectableObservable to begin emitting the items from its underlying
Observable to its Observers.
|
| public static < the source value type T> ConnectableObservable | Returns: the connectable observablethe source observable source)Creates a OperatorPublish instance to publish values of the given source observable. |
| public ObservableSource | publishSource()
Implements io. |
| public ObservableSource | source()
Implements io. |
| protected void | subscribeActual(Observer<? super T>
the incoming Observer, never null observer)Implements abstract io. Observers.
|
| current | back to summary |
|---|---|
| pack-priv final AtomicReference<ObservablePublish. Holds the current subscriber that is, will be or just was subscribed to the source observable. | |
| onSubscribe | back to summary |
|---|---|
| pack-priv final ObservableSource<T> onSubscribe | |
| source | back to summary |
|---|---|
| pack-priv final ObservableSource<T> source The source observable. | |
| ObservablePublish | back to summary |
|---|---|
| private ObservablePublish(ObservableSource<T> onSubscribe, ObservableSource<T> source, final AtomicReference<ObservablePublish. | |
| connect | back to summary |
|---|---|
| public void connect(Consumer<? super Disposable> connection) Implements abstract io. Doc from io. Instructs the
| |
| create | back to summary |
|---|---|
| public static <T> ConnectableObservable Creates a OperatorPublish instance to publish values of the given source observable.
| |
| publishSource | back to summary |
|---|---|
| public ObservableSource Implements io. Doc from io. The upstream source of this publish operator.
| |
| source | back to summary |
|---|---|
| public ObservableSource Implements io. Doc from io. Returns the upstream source of this Observable. Allows discovering the chain of observables.
| |
| 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 | |
this holds the parent PublishObserver or itself if disposed
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Observer | child
The actual child subscriber. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | dispose()
Implements io. |
| public boolean | isDisposed()
Implements io. |
| pack-priv void |
| child | back to summary |
|---|---|
| pack-priv final Observer<? super T> child The actual child subscriber. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. | |
| InnerDisposable | back to summary |
|---|---|
| pack-priv InnerDisposable(Observer<? super T> child) | |
| dispose | back to summary |
|---|---|
| public void dispose() Implements io. Doc from io. Dispose the resource, the operation should be idempotent.
| |
| isDisposed | back to summary |
|---|---|
| public boolean isDisposed() Implements io. Doc from io. Returns true if this resource has been disposed.
| |
| setParent | back to summary |
|---|---|
| pack-priv void setParent(ObservablePublish. | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final AtomicReference | current
Holds onto the current connected PublishObserver. |
| pack-priv static final ObservablePublish. | EMPTY
Indicates an empty array of inner observers. |
| pack-priv final AtomicReference | observers
Tracks the subscribed observers. |
| pack-priv final AtomicBoolean | shouldConnect
Atomically changed from false to true by connect to make sure the connection is only performed by one thread. |
| pack-priv static final ObservablePublish. | TERMINATED
Indicates a terminated PublishObserver. |
| pack-priv final AtomicReference |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | Returns: true if succeeded, false otherwisethe producer to add producerAtomically try adding a new InnerDisposable to this Observer or return false if this Observer was terminated. |
| public void | dispose()
Implements io. |
| 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 e)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.
|
| pack-priv void | remove(ObservablePublish.
the producer to remove producerAtomically removes the given producer from the observers array. |
| current | back to summary |
|---|---|
| pack-priv final AtomicReference<ObservablePublish. Holds onto the current connected PublishObserver. | |
| EMPTY | back to summary |
|---|---|
| pack-priv static final ObservablePublish. Indicates an empty array of inner observers. | |
| observers | back to summary |
|---|---|
| pack-priv final AtomicReference<ObservablePublish. Tracks the subscribed observers. | |
| shouldConnect | back to summary |
|---|---|
| pack-priv final AtomicBoolean shouldConnect Atomically changed from false to true by connect to make sure the connection is only performed by one thread. | |
| TERMINATED | back to summary |
|---|---|
| pack-priv static final ObservablePublish. Indicates a terminated PublishObserver. | |
| upstream | back to summary |
|---|---|
| pack-priv final AtomicReference<Disposable> upstream | |
| PublishObserver | back to summary |
|---|---|
pack-priv PublishObserver(AtomicReference<ObservablePublish.
| |
| add | back to summary |
|---|---|
| pack-priv boolean add(ObservablePublish. Atomically try adding a new InnerDisposable to this Observer or return false if this Observer was terminated.
| |
| dispose | back to summary |
|---|---|
| public void dispose() Implements io. Doc from io. Dispose the resource, the operation should be idempotent.
| |
| 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 e) 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
| |
| remove | back to summary |
|---|---|
| pack-priv void remove(ObservablePublish. Atomically removes the given producer from the observers array.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final AtomicReference |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | subscribe(Observer<? super T>
the Observer, not null child)Implements io. |
| curr | back to summary |
|---|---|
| private final AtomicReference<ObservablePublish. | |
| PublishSource | back to summary |
|---|---|
| pack-priv PublishSource(AtomicReference<ObservablePublish. | |
| subscribe | back to summary |
|---|---|
| public void subscribe(Observer<? super T> child) Implements io. Doc from io. Subscribes the given Observer to this ObservableSource instance. | |