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

public final Class FlowableConcatWithMaybe<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 Maybe, signal its success value followed by a completion or signal its error or completion signal 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 MaybeSource<? extends T>
Inherited from io.reactivex.internal.operators.flowable.AbstractFlowableWithUpstream:
source

Constructor Summary

AccessConstructor and Description
public
FlowableConcatWithMaybe(Flowable<T> source, MaybeSource<? 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 MaybeSource<? extends T> other

Constructor Detail

FlowableConcatWithMaybeback to summary
public FlowableConcatWithMaybe(Flowable<T> source, MaybeSource<? 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 FlowableConcatWithMaybe.ConcatWithSubscriber<T>

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

Field Summary

Modifier and TypeField and Description
pack-priv boolean
pack-priv MaybeSource<? 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, MaybeSource<? 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 io.reactivex.MaybeObserver.onComplete, org.reactivestreams.Subscriber.onComplete.

Called once the deferred computation completes normally.
public void
onError(Throwable
the exception encountered by the Maybe
t
)

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

Notifies the MaybeObserver that the Maybe 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.MaybeObserver.onSubscribe.

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

Implements io.reactivex.MaybeObserver.onSuccess.

Notifies the MaybeObserver with one item and that the Maybe has finished sending push-based notifications.
Inherited from io.reactivex.internal.subscribers.SinglePostCompleteSubscriber:
completeonDroponSubscriberequest

Field Detail

inMaybeback to summary
pack-priv boolean inMaybe
otherback to summary
pack-priv MaybeSource<? 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, MaybeSource<? 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 io.reactivex.MaybeObserver.onComplete, org.reactivestreams.Subscriber.onComplete.

Doc from io.reactivex.MaybeObserver.onComplete.

Called once the deferred computation completes normally.

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

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

Doc from io.reactivex.MaybeObserver.onError.

Notifies the MaybeObserver that the Maybe has experienced an error condition.

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

Parameters
t:Throwable

the exception encountered by the Maybe

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.MaybeObserver.onSubscribe.

Doc from io.reactivex.MaybeObserver.onSubscribe.

Provides the MaybeObserver with the means of cancelling (disposing) the connection (channel) with the Maybe 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.MaybeObserver.onSuccess.

Doc from io.reactivex.MaybeObserver.onSuccess.

Notifies the MaybeObserver with one item and that the Maybe has finished sending push-based notifications.

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

Parameters
t:T

the item emitted by the Maybe

Annotations
@Override