Top Description Inners Fields Constructors Methods
rx.internal.operators

public final Class OnSubscribeConcatMap<T, R>

extends Object
implements Observable.OnSubscribe<R>
Class Inheritance
All Implemented Interfaces
rx.Observable.OnSubscribe, rx.functions.Action1, rx.functions.Action, rx.functions.Function
Type Parameters
<T>
the source value type
<R>
the output value type
Imports
java.util.Queue, java.util.concurrent.atomic.*, rx.*, .Observable.OnSubscribe, rx.exceptions.*, rx.functions.Func1, rx.internal.producers.ProducerArbiter, rx.internal.util.*, rx.internal.util.atomic.SpscAtomicArrayQueue, rx.internal.util.unsafe.*, rx.observers.SerializedSubscriber, rx.plugins.RxJavaHooks, rx.subscriptions.SerialSubscription

Maps a source sequence into Observables and concatenates them in order, subscribing to one at a time.
Since
1.1.2

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class
pack-priv static class

Field Summary

Modifier and TypeField and Description
public static final int
BOUNDARY

Whenever the main fires an error, wait until the inner terminates.

pack-priv final int
delayErrorMode

How to handle errors from the main and inner Observables.

public static final int
END

Delay all errors to the very end.

public static final int
IMMEDIATE

Whenever any Observable fires an error, terminate with that error immediately.

pack-priv final Func1<? super T, ? extends Observable<? extends R>>
pack-priv final int
pack-priv final Observable<? extends T>

Constructor Summary

AccessConstructor and Description
public
OnSubscribeConcatMap(Observable<? extends T> source, Func1<? super T, ? extends Observable<? extends R>> mapper, int prefetch, int delayErrorMode)

Method Summary

Modifier and TypeMethod and Description
public void
call(Subscriber<? super R> child)

Implements rx.functions.Action1.call.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

BOUNDARYback to summary
public static final int BOUNDARY

Whenever the main fires an error, wait until the inner terminates.

delayErrorModeback to summary
pack-priv final int delayErrorMode

How to handle errors from the main and inner Observables. See the constants below.

ENDback to summary
public static final int END

Delay all errors to the very end.

IMMEDIATEback to summary
public static final int IMMEDIATE

Whenever any Observable fires an error, terminate with that error immediately.

mapperback to summary
pack-priv final Func1<? super T, ? extends Observable<? extends R>> mapper
prefetchback to summary
pack-priv final int prefetch
sourceback to summary
pack-priv final Observable<? extends T> source

Constructor Detail

OnSubscribeConcatMapback to summary
public OnSubscribeConcatMap(Observable<? extends T> source, Func1<? super T, ? extends Observable<? extends R>> mapper, int prefetch, int delayErrorMode)

Method Detail

callback to summary
public void call(Subscriber<? super R> child)

Implements rx.functions.Action1.call.

Annotations
@Override
rx.internal.operators back to summary

pack-priv final Class OnSubscribeConcatMap.ConcatMapInnerScalarProducer<T, R>

extends Object
implements Producer
Class Inheritance
  • java.lang.Object
  • rx.internal.operators.OnSubscribeConcatMap.ConcatMapInnerScalarProducer
All Implemented Interfaces
rx.Producer

Field Summary

Modifier and TypeField and Description
pack-priv boolean
pack-priv final OnSubscribeConcatMap.ConcatMapSubscriber<T, R>
pack-priv final R

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
request(long
the maximum number of items you want this Producer to produce, or Long.MAX_VALUE if you want the Producer to produce items at its own pace
n
)

Implements rx.Producer.request.

Request a certain maximum number of items from this Producer.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

onceback to summary
pack-priv boolean once
parentback to summary
pack-priv final OnSubscribeConcatMap.ConcatMapSubscriber<T, R> parent
valueback to summary
pack-priv final R value

Constructor Detail

ConcatMapInnerScalarProducerback to summary
public ConcatMapInnerScalarProducer(R value, OnSubscribeConcatMap.ConcatMapSubscriber<T, R> parent)

Method Detail

requestback to summary
public void request(long n)

Implements rx.Producer.request.

Doc from rx.Producer.request.

Request a certain maximum number of items from this Producer. This is a way of requesting backpressure. To disable backpressure, pass Long.MAX_VALUE to this method.

Requests are additive but if a sequence of requests totals more than Long.MAX_VALUE then Long.MAX_VALUE requests will be actioned and the extras may be ignored. Arriving at Long.MAX_VALUE by addition of requests cannot be assumed to disable backpressure. For example, the code below may result in Long.MAX_VALUE requests being actioned only.

request(100);
request(Long.MAX_VALUE-1);
Parameters
n:long

the maximum number of items you want this Producer to produce, or Long.MAX_VALUE if you want the Producer to produce items at its own pace

Annotations
@Override
rx.internal.operators back to summary

pack-priv final Class OnSubscribeConcatMap.ConcatMapInnerSubscriber<T, R>

extends Subscriber<R>
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final OnSubscribeConcatMap.ConcatMapSubscriber<T, R>
pack-priv long

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
onCompleted()

Implements rx.Observer.onCompleted.

Notifies the Observer that the Observable has finished sending push-based notifications.
public void
onError(Throwable
the exception encountered by the Observable
e
)

Implements rx.Observer.onError.

Notifies the Observer that the Observable has experienced an error condition.
public void
onNext(R
the item emitted by the Observable
t
)

Implements rx.Observer.onNext.

Provides the Observer with a new item to observe.
public void
setProducer(Producer
producer to be used by this subscriber or the other subscriber (or recursively its other subscriber) to make requests from
p
)

Overrides rx.Subscriber.setProducer.

If other subscriber is set (by calling constructor Subscriber(Subscriber) or Subscriber(Subscriber, boolean)) then this method calls setProducer on the other subscriber.
Inherited from rx.Subscriber:
addisUnsubscribedonStartrequestunsubscribe

Field Detail

parentback to summary
pack-priv final OnSubscribeConcatMap.ConcatMapSubscriber<T, R> parent
producedback to summary
pack-priv long produced

Constructor Detail

ConcatMapInnerSubscriberback to summary
public ConcatMapInnerSubscriber(OnSubscribeConcatMap.ConcatMapSubscriber<T, R> parent)

Method Detail

onCompletedback to summary
public void onCompleted()

Implements rx.Observer.onCompleted.

Doc from rx.Observer.onCompleted.

Notifies the Observer that the Observable has finished sending push-based notifications.

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

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

Implements rx.Observer.onError.

Doc from rx.Observer.onError.

Notifies the Observer that the Observable has experienced an error condition.

If the Observable calls this method, it will not thereafter call onNext or onCompleted.

Parameters
e:Throwable

the exception encountered by the Observable

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

Implements rx.Observer.onNext.

Doc from rx.Observer.onNext.

Provides the Observer with a new item to observe.

The Observable may call this method 0 or more times.

The Observable will not call this method again after it calls either onCompleted or onError.

Parameters
t:R

the item emitted by the Observable

Annotations
@Override
setProducerback to summary
public void setProducer(Producer p)

Overrides rx.Subscriber.setProducer.

Doc from rx.Subscriber.setProducer.

If other subscriber is set (by calling constructor Subscriber(Subscriber) or Subscriber(Subscriber, boolean)) then this method calls setProducer on the other subscriber. If the other subscriber is not set and no requests have been made to this subscriber then p.request(Long.MAX_VALUE) is called. If the other subscriber is not set and some requests have been made to this subscriber then p.request(n) is called where n is the accumulated requests to this subscriber.

Parameters
p:Producer

producer to be used by this subscriber or the other subscriber (or recursively its other subscriber) to make requests from

Annotations
@Override
rx.internal.operators back to summary

pack-priv final Class OnSubscribeConcatMap.ConcatMapSubscriber<T, R>

extends Subscriber<T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv volatile boolean
pack-priv final Subscriber<? super R>
pack-priv final ProducerArbiter
pack-priv final int
pack-priv volatile boolean
pack-priv final AtomicReference<Throwable>
pack-priv final SerialSubscription
pack-priv final Func1<? super T, ? extends Observable<? extends R>>
pack-priv final Queue<Object>
pack-priv final AtomicInteger

Constructor Summary

AccessConstructor and Description
public
ConcatMapSubscriber(Subscriber<? super R> actual, Func1<? super T, ? extends Observable<? extends R>> mapper, int prefetch, int delayErrorMode)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv void
drainError(Throwable mapperError)

pack-priv void
innerCompleted(long produced)

pack-priv void
innerError(Throwable innerError, long produced)

pack-priv void
innerNext(R value)

public void
onCompleted()

Implements rx.Observer.onCompleted.

Notifies the Observer that the Observable has finished sending push-based notifications.
public void
onError(Throwable
the exception encountered by the Observable
mainError
)

Implements rx.Observer.onError.

Notifies the Observer that the Observable has experienced an error condition.
public void
onNext(T
the item emitted by the Observable
t
)

Implements rx.Observer.onNext.

Provides the Observer with a new item to observe.
pack-priv void
pack-priv void
requestMore(long n)

Inherited from rx.Subscriber:
addisUnsubscribedonStartrequestsetProducerunsubscribe

Field Detail

activeback to summary
pack-priv volatile boolean active
actualback to summary
pack-priv final Subscriber<? super R> actual
arbiterback to summary
pack-priv final ProducerArbiter arbiter
delayErrorModeback to summary
pack-priv final int delayErrorMode
doneback to summary
pack-priv volatile boolean done
errorback to summary
pack-priv final AtomicReference<Throwable> error
innerback to summary
pack-priv final SerialSubscription inner
mapperback to summary
pack-priv final Func1<? super T, ? extends Observable<? extends R>> mapper
queueback to summary
pack-priv final Queue<Object> queue
wipback to summary
pack-priv final AtomicInteger wip

Constructor Detail

ConcatMapSubscriberback to summary
public ConcatMapSubscriber(Subscriber<? super R> actual, Func1<? super T, ? extends Observable<? extends R>> mapper, int prefetch, int delayErrorMode)

Method Detail

drainback to summary
pack-priv void drain()
drainErrorback to summary
pack-priv void drainError(Throwable mapperError)
innerCompletedback to summary
pack-priv void innerCompleted(long produced)
innerErrorback to summary
pack-priv void innerError(Throwable innerError, long produced)
innerNextback to summary
pack-priv void innerNext(R value)
onCompletedback to summary
public void onCompleted()

Implements rx.Observer.onCompleted.

Doc from rx.Observer.onCompleted.

Notifies the Observer that the Observable has finished sending push-based notifications.

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

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

Implements rx.Observer.onError.

Doc from rx.Observer.onError.

Notifies the Observer that the Observable has experienced an error condition.

If the Observable calls this method, it will not thereafter call onNext or onCompleted.

Parameters
mainError:Throwable

the exception encountered by the Observable

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

Implements rx.Observer.onNext.

Doc from rx.Observer.onNext.

Provides the Observer with a new item to observe.

The Observable may call this method 0 or more times.

The Observable will not call this method again after it calls either onCompleted or onError.

Parameters
t:T

the item emitted by the Observable

Annotations
@Override
pluginErrorback to summary
pack-priv void pluginError(Throwable e)
requestMoreback to summary
pack-priv void requestMore(long n)