Top Description Inners Fields Constructors Methods
io.reactivex.internal.operators.flowable

public final Class FlowableConcatWithSingle<T>

extends AbstractFlowableWithUpstream<T, T>
Class Inheritance
Type Parameters
<T>
the element type of the main source and output type
Imports
java.util.concurrent.atomic.*, org.reactivestreams.*, io.reactivex.*, io.reactivex.disposables.Disposable, io.reactivex.internal.disposables.DisposableHelper, io.reactivex.internal.subscribers.SinglePostCompleteSubscriber, io.reactivex.internal.subscriptions.SubscriptionHelper

Subscribe to a main Flowable first, then when it completes normally, subscribe to a Single, signal its success value followed by a completion or signal its error as is.

History: 2.1.10 - experimental

Since
2.2

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Modifier and TypeField and Description
pack-priv final SingleSource<? extends T>
Inherited from io.reactivex.internal.operators.flowable.AbstractFlowableWithUpstream:
source

Constructor Summary

AccessConstructor and Description
public
FlowableConcatWithSingle(Flowable<T> source, SingleSource<? extends T> other)

Method Summary

Modifier and TypeMethod and Description
protected void
subscribeActual(Subscriber<? super T>
the incoming Subscriber, never null
s
)

Implements abstract io.reactivex.Flowable.subscribeActual.

Operator implementations (both source and intermediate) should implement this method that performs the necessary business logic and handles the incoming Subscribers.
Inherited from io.reactivex.internal.operators.flowable.AbstractFlowableWithUpstream:
source

Field Detail

otherback to summary
pack-priv final SingleSource<? extends T> other

Constructor Detail

FlowableConcatWithSingleback to summary
public FlowableConcatWithSingle(Flowable<T> source, SingleSource<? extends T> other)

Method Detail

subscribeActualback to summary
protected void subscribeActual(Subscriber<? super T> s)

Implements abstract io.reactivex.Flowable.subscribeActual.

Doc from io.reactivex.Flowable.subscribeActual.

Operator implementations (both source and intermediate) should implement this method that performs the necessary business logic and handles the incoming Subscribers.

There is no need to call any of the plugin hooks on the current Flowable instance or the Subscriber; all hooks and basic safeguards have been applied by subscribe(Subscriber) before this method gets called.

Parameters
s:Subscriber<? super T>

the incoming Subscriber, never null

Annotations
@Override
io.reactivex.internal.operators.flowable back to summary

pack-priv final Class FlowableConcatWithSingle.ConcatWithSubscriber<T>

extends SinglePostCompleteSubscriber<T, T>
implements SingleObserver<T>
Class Inheritance
All Implemented Interfaces
io.reactivex.SingleObserver

Field Summary

Modifier and TypeField and Description
pack-priv SingleSource<? extends T>
pack-priv final AtomicReference<Disposable>
private static final long
Inherited from io.reactivex.internal.subscribers.SinglePostCompleteSubscriber:
downstreamproducedupstreamvalue

Constructor Summary

AccessConstructor and Description
pack-priv
ConcatWithSubscriber(Subscriber<? super T> actual, SingleSource<? extends T> other)

Method Summary

Modifier and TypeMethod and Description
public void
cancel()

Overrides io.reactivex.internal.subscribers.SinglePostCompleteSubscriber.cancel.

Implements org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.
public void
onComplete()

Implements org.reactivestreams.Subscriber.onComplete.

Successful terminal state.
public void
onError(Throwable
the exception encountered by the Single
t
)

Implements io.reactivex.SingleObserver.onError, org.reactivestreams.Subscriber.onError.

Notifies the SingleObserver that the Single has experienced an error condition.
public void
onNext(T
the element signaled
t
)

Implements org.reactivestreams.Subscriber.onNext.

Data notification sent by the Publisher in response to requests to Subscription#request(long).
public void
onSubscribe(Disposable
the Disposable instance whose Disposable#dispose() can be called anytime to cancel the connection
d
)

Implements io.reactivex.SingleObserver.onSubscribe.

Provides the SingleObserver with the means of cancelling (disposing) the connection (channel) with the Single in both synchronous (from within onSubscribe(Disposable) itself) and asynchronous manner.
public void
onSuccess(T
the item emitted by the Single
t
)

Implements io.reactivex.SingleObserver.onSuccess.

Notifies the SingleObserver with a single item and that the Single has finished sending push-based notifications.
Inherited from io.reactivex.internal.subscribers.SinglePostCompleteSubscriber:
completeonDroponSubscriberequest

Field Detail

otherback to summary
pack-priv SingleSource<? extends T> other
otherDisposableback to summary
pack-priv final AtomicReference<Disposable> otherDisposable
serialVersionUIDback to summary
private static final long serialVersionUID

Hides io.reactivex.internal.subscribers.SinglePostCompleteSubscriber.serialVersionUID.

Constructor Detail

ConcatWithSubscriberback to summary
pack-priv ConcatWithSubscriber(Subscriber<? super T> actual, SingleSource<? extends T> other)

Method Detail

cancelback to summary
public void cancel()

Overrides io.reactivex.internal.subscribers.SinglePostCompleteSubscriber.cancel.

Implements org.reactivestreams.Subscription.cancel.

Doc from org.reactivestreams.Subscription.cancel.

Request the Publisher to stop sending data and clean up resources.

Data may still be sent to meet previously signalled demand after calling cancel.

Annotations
@Override
onCompleteback to summary
public void onComplete()

Implements org.reactivestreams.Subscriber.onComplete.

Doc from org.reactivestreams.Subscriber.onComplete.

Successful terminal state.

No further events will be sent even if Subscription#request(long) is invoked again.

Annotations
@Override
onErrorback to summary
public void onError(Throwable t)

Implements io.reactivex.SingleObserver.onError, org.reactivestreams.Subscriber.onError.

Doc from io.reactivex.SingleObserver.onError.

Notifies the SingleObserver that the Single has experienced an error condition.

If the Single calls this method, it will not thereafter call onSuccess.

Parameters
t:Throwable

the exception encountered by the Single

Annotations
@Override
onNextback to summary
public void onNext(T t)

Implements org.reactivestreams.Subscriber.onNext.

Doc from org.reactivestreams.Subscriber.onNext.

Data notification sent by the Publisher in response to requests to Subscription#request(long).

Parameters
t:T

the element signaled

Annotations
@Override
onSubscribeback to summary
public void onSubscribe(Disposable d)

Implements io.reactivex.SingleObserver.onSubscribe.

Doc from io.reactivex.SingleObserver.onSubscribe.

Provides the SingleObserver with the means of cancelling (disposing) the connection (channel) with the Single in both synchronous (from within onSubscribe(Disposable) itself) and asynchronous manner.

Parameters
d:Disposable

the Disposable instance whose Disposable#dispose() can be called anytime to cancel the connection

Annotations
@Override
onSuccessback to summary
public void onSuccess(T t)

Implements io.reactivex.SingleObserver.onSuccess.

Doc from io.reactivex.SingleObserver.onSuccess.

Notifies the SingleObserver with a single item and that the Single has finished sending push-based notifications.

The Single will not call this method if it calls onError.

Parameters
t:T

the item emitted by the Single

Annotations
@Override