ConnectableObservable
ConnectableObservable resembles an ordinary Observable, except that it does not begin
emitting items when it is subscribed to, but only when its connect method is called. In this way you
can wait for all intended Subscribers to Observable#subscribe to the Observable
before the Observable begins emitting items.
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public Observable | Returns: an Observable that automatically connects to this ConnectableObservable when the first Subscriber subscribesReturns an Observable that automatically connects to this ConnectableObservable when the first Subscriber subscribes. |
| public Observable | Returns: an Observable that automatically connects to this ConnectableObservable when the specified number of Subscribers subscribe to itthe number of subscribers to await before calling connect
on the ConnectableObservable. A non-positive value indicates
an immediate connection. numberOfSubscribers)Returns an Observable that automatically connects to this ConnectableObservable when the specified number of Subscribers subscribe to it. |
| public Observable | Returns: an Observable that automatically connects to this ConnectableObservable when the specified number of Subscribers subscribe to it and calls the specified callback with the Subscription associated with the established connectionthe number of subscribers to await before calling connect
on the ConnectableObservable. A non-positive value indicates
an immediate connection. numberOfSubscribers, Action1<? super Subscription> the callback Action1 that will receive the Subscription representing the
established connection connection)Returns an Observable that automatically connects to this ConnectableObservable when the specified number of Subscribers subscribe to it and calls the specified callback with the Subscription associated with the established connection. |
| public final Subscription | Returns: the subscription representing the connectionInstructs the |
| public abstract void | connect(Action1<? super Subscription>
the action that receives the connection subscription before the subscription to source happens
allowing the caller to synchronously disconnect a synchronous source connection)Instructs the |
| public Observable | Returns: aObservableReturns an |
| ConnectableObservable | back to summary |
|---|---|
| protected ConnectableObservable(Observable. | |
| autoConnect | back to summary |
|---|---|
| public Observable Returns an Observable that automatically connects to this ConnectableObservable when the first Subscriber subscribes.
| |
| autoConnect | back to summary |
|---|---|
| public Observable Returns an Observable that automatically connects to this ConnectableObservable when the specified number of Subscribers subscribe to it.
| |
| autoConnect | back to summary |
|---|---|
| public Observable Returns an Observable that automatically connects to this ConnectableObservable when the specified number of Subscribers subscribe to it and calls the specified callback with the Subscription associated with the established connection.
| |
| connect | back to summary |
|---|---|
| public final Subscription connect() Instructs the
To disconnect from a synchronous source, use the
| |
| connect | back to summary |
|---|---|
| public abstract void connect(Action1<? super Subscription> connection) Instructs the
| |
| refCount | back to summary |
|---|---|
| public Observable Returns an
| |