The difference to FlowablePublish is that when the upstream terminates, late subscriberss will receive that terminal event until the connection is disposed and the ConnectableFlowable is reset to its fresh state.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | |
| pack-priv static class |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final int | |
| pack-priv final AtomicReference | |
| pack-priv final Publisher |
| Access | Constructor and Description |
|---|---|
| public |
| 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. ConnectableFlowable to begin emitting the items from its underlying
Flowable to its Subscribers.
|
| public int | Returns: The internal buffer size of this FloawblePublishAlt operator.The internal buffer size of this FloawblePublishAlt operator. |
| public void | resetIf(Disposable
the disposable received from a previous connection)connect() call.Implements io. Disposable connection instance
is still representing a connection established by a previous connect() connection.
|
| public Publisher | source()
Implements io. |
| protected void | subscribeActual(Subscriber<? super T>
the incoming Subscriber, never null s)Implements abstract io. Subscribers.
|
| bufferSize | back to summary |
|---|---|
| pack-priv final int bufferSize | |
| current | back to summary |
|---|---|
| pack-priv final AtomicReference<FlowablePublishAlt. | |
| source | back to summary |
|---|---|
| pack-priv final Publisher<T> source | |
| FlowablePublishAlt | back to summary |
|---|---|
| public FlowablePublishAlt(Publisher<T> source, int bufferSize) | |
| connect | back to summary |
|---|---|
| public void connect(Consumer<? super Disposable> connection) Implements abstract io. Doc from io. Instructs the
| |
| publishBufferSize | back to summary |
|---|---|
| public int publishBufferSize() The internal buffer size of this FloawblePublishAlt operator.
| |
| resetIf | back to summary |
|---|---|
| public void resetIf(Disposable connection) Implements io. Doc from io. Reset the connectable source only if the given For example, an immediately previous connection should reset the connectable source:
However, if the connection indicator Disposable is from a much earlier connection,
it should not affect the current connection:
| |
| source | back to summary |
|---|---|
| public Publisher Implements io. Doc from io. Returns the source Publisher. This method is intended to discover the assembly graph of sequences. | |
| subscribeActual | back to summary |
|---|---|
| protected void subscribeActual(Subscriber<? super T> s) 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
| |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final Subscriber | |
| pack-priv long | |
| pack-priv final FlowablePublishAlt. | |
| private static final long |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public void | cancel()
Implements org. Publisher to stop sending data and clean up resources.
|
| public boolean | |
| public void | request(long
the strictly positive number of elements to requests to the upstream n)PublisherImplements org. Publisher until demand is signaled via this method.
|
| downstream | back to summary |
|---|---|
| pack-priv final Subscriber<? super T> downstream | |
| emitted | back to summary |
|---|---|
| pack-priv long emitted | |
| parent | back to summary |
|---|---|
| pack-priv final FlowablePublishAlt. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. | |
| InnerSubscription | back to summary |
|---|---|
| pack-priv InnerSubscription(Subscriber<? super T> downstream, FlowablePublishAlt. | |
| cancel | back to summary |
|---|---|
| public void cancel() Implements org. Doc from org. Request the Data may still be sent to meet previously signalled demand after calling cancel.
| |
| isCancelled | back to summary |
|---|---|
| public boolean isCancelled() | |
| request | back to summary |
|---|---|
| public void request(long n) Implements org. Doc from org. No events will be sent by a
It can be called however often and whenever needed—but if the outstanding cumulative demand ever becomes Long.MAX_VALUE or more,
it may be treated by the
Whatever has been requested can be sent by the
A | |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv final int | |
| pack-priv final AtomicBoolean | |
| pack-priv int | |
| pack-priv final AtomicReference | |
| pack-priv volatile boolean | |
| pack-priv static final FlowablePublishAlt. | |
| pack-priv Throwable | |
| pack-priv volatile SimpleQueue | |
| private static final long | |
| pack-priv int | |
| pack-priv final AtomicReference | |
| pack-priv static final FlowablePublishAlt. | |
| pack-priv final AtomicReference |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv boolean | |
| pack-priv boolean | |
| public void | dispose()
Implements io. |
| pack-priv void | |
| public boolean | isDisposed()
Implements io. |
| public void | |
| public void | onError(Throwable
the throwable signaled t)Implements org. |
| public void | onNext(T
the element signaled t)Implements org. Publisher in response to requests to Subscription#request(long).
|
| public void | onSubscribe(Subscription
the s)Subscription that allows requesting data via Subscription#request(long)Implements io. onNext(Object) is established before
calling Subscription#request(long).
|
| pack-priv void | |
| pack-priv void |
| bufferSize | back to summary |
|---|---|
| pack-priv final int bufferSize | |
| connect | back to summary |
|---|---|
| pack-priv final AtomicBoolean connect | |
| consumed | back to summary |
|---|---|
| pack-priv int consumed | |
| current | back to summary |
|---|---|
| pack-priv final AtomicReference<FlowablePublishAlt. | |
| done | back to summary |
|---|---|
| pack-priv volatile boolean done | |
| EMPTY | back to summary |
|---|---|
pack-priv static final FlowablePublishAlt.
| |
| error | back to summary |
|---|---|
| pack-priv Throwable error | |
| queue | back to summary |
|---|---|
| pack-priv volatile SimpleQueue<T> queue | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. | |
| sourceMode | back to summary |
|---|---|
| pack-priv int sourceMode | |
| subscribers | back to summary |
|---|---|
| pack-priv final AtomicReference<FlowablePublishAlt. | |
| TERMINATED | back to summary |
|---|---|
pack-priv static final FlowablePublishAlt.
| |
| upstream | back to summary |
|---|---|
| pack-priv final AtomicReference<Subscription> upstream | |
| PublishConnection | back to summary |
|---|---|
pack-priv PublishConnection(AtomicReference<FlowablePublishAlt.
| |
| add | back to summary |
|---|---|
| pack-priv boolean add(FlowablePublishAlt. | |
| checkTerminated | back to summary |
|---|---|
pack-priv boolean checkTerminated(boolean isDone, boolean isEmpty)
| |
| dispose | back to summary |
|---|---|
| public void dispose() Implements io. Doc from io. Dispose the resource, the operation should be idempotent.
| |
| drain | back to summary |
|---|---|
| pack-priv void drain() | |
| 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 org. Doc from org. Successful terminal state.
No further events will be sent even if
| |
| onError | back to summary |
|---|---|
| public void onError(Throwable t) Implements org. Doc from org. Failed terminal state.
No further events will be sent even if | |
| onNext | back to summary |
|---|---|
| public void onNext(T t) Implements org. Doc from org. Data notification sent by the
| |
| onSubscribe | back to summary |
|---|---|
| public void onSubscribe(Subscription s) Implements io. Doc from io. Implementors of this method should make sure everything that needs
to be visible in
No data will start flowing until
It is the responsibility of this
The
| |
| remove | back to summary |
|---|---|
pack-priv void remove(FlowablePublishAlt.
| |
| signalError | back to summary |
|---|---|
pack-priv void signalError(Throwable ex)
| |