Top Description Inners Fields Constructors Methods
rx.internal.operators

public final Class OnSubscribeTimeoutTimedWithFallback<T>

extends Object
implements Observable.OnSubscribe<T>
Class Inheritance
All Implemented Interfaces
rx.Observable.OnSubscribe, rx.functions.Action1, rx.functions.Action, rx.functions.Function
Type Parameters
<T>
the value type
Imports
java.util.concurrent.*, java.util.concurrent.atomic.AtomicLong, rx.*, .Scheduler.Worker, rx.functions.Action0, rx.internal.producers.ProducerArbiter, rx.internal.subscriptions.SequentialSubscription, rx.plugins.RxJavaHooks

Switches to consuming a fallback Observable if the main source doesn't signal an onNext event within the given time frame after subscription or the previous onNext event.
Since
1.3.3

Nested and Inner Type Summary

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

Field Summary

Modifier and TypeField and Description
pack-priv final Observable<? extends T>
pack-priv final Scheduler
pack-priv final Observable<T>
pack-priv final long
pack-priv final TimeUnit

Constructor Summary

AccessConstructor and Description
public
OnSubscribeTimeoutTimedWithFallback(Observable<T> source, long timeout, TimeUnit unit, Scheduler scheduler, Observable<? extends T> fallback)

Method Summary

Modifier and TypeMethod and Description
public void
call(Subscriber<? super T> t)

Implements rx.functions.Action1.call.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fallbackback to summary
pack-priv final Observable<? extends T> fallback
schedulerback to summary
pack-priv final Scheduler scheduler
sourceback to summary
pack-priv final Observable<T> source
timeoutback to summary
pack-priv final long timeout
unitback to summary
pack-priv final TimeUnit unit

Constructor Detail

OnSubscribeTimeoutTimedWithFallbackback to summary
public OnSubscribeTimeoutTimedWithFallback(Observable<T> source, long timeout, TimeUnit unit, Scheduler scheduler, Observable<? extends T> fallback)

Method Detail

callback to summary
public void call(Subscriber<? super T> t)

Implements rx.functions.Action1.call.

Annotations
@Override
rx.internal.operators back to summary

pack-priv final Class OnSubscribeTimeoutTimedWithFallback.FallbackSubscriber<T>

extends Subscriber<T>
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv final Subscriber<? super T>
pack-priv final ProducerArbiter

Constructor Summary

AccessConstructor and Description
pack-priv
FallbackSubscriber(Subscriber<? super T> actual, ProducerArbiter arbiter)

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(T
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

actualback to summary
pack-priv final Subscriber<? super T> actual
arbiterback to summary
pack-priv final ProducerArbiter arbiter

Constructor Detail

FallbackSubscriberback to summary
pack-priv FallbackSubscriber(Subscriber<? super T> actual, ProducerArbiter arbiter)

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(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
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 OnSubscribeTimeoutTimedWithFallback.TimeoutMainSubscriber<T>

extends Subscriber<T>
Class Inheritance

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
pack-priv final Subscriber<? super T>
pack-priv final ProducerArbiter
pack-priv long
pack-priv final Observable<? extends T>
pack-priv final AtomicLong
pack-priv final SequentialSubscription
pack-priv final long
pack-priv final TimeUnit
pack-priv final SequentialSubscription
pack-priv final Scheduler.Worker

Constructor Summary

AccessConstructor and Description
pack-priv
TimeoutMainSubscriber(Subscriber<? super T> actual, long timeout, TimeUnit unit, Scheduler.Worker worker, Observable<? extends T> fallback)

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(T
the item emitted by the Observable
t
)

Implements rx.Observer.onNext.

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

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.
pack-priv void
startTimeout(long nextIdx)

Inherited from rx.Subscriber:
addisUnsubscribedonStartrequestunsubscribe

Field Detail

actualback to summary
pack-priv final Subscriber<? super T> actual
arbiterback to summary
pack-priv final ProducerArbiter arbiter
consumedback to summary
pack-priv long consumed
fallbackback to summary
pack-priv final Observable<? extends T> fallback
indexback to summary
pack-priv final AtomicLong index
taskback to summary
pack-priv final SequentialSubscription task
timeoutback to summary
pack-priv final long timeout
unitback to summary
pack-priv final TimeUnit unit
upstreamback to summary
pack-priv final SequentialSubscription upstream
workerback to summary
pack-priv final Scheduler.Worker worker

Constructor Detail

TimeoutMainSubscriberback to summary
pack-priv TimeoutMainSubscriber(Subscriber<? super T> actual, long timeout, TimeUnit unit, Scheduler.Worker worker, Observable<? extends T> fallback)

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(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
onTimeoutback to summary
pack-priv void onTimeout(long idx)
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
startTimeoutback to summary
pack-priv void startTimeout(long nextIdx)
rx.internal.operators back to summary

pack-priv final Class OnSubscribeTimeoutTimedWithFallback.TimeoutMainSubscriber.TimeoutTask

extends Object
implements Action0
Class Inheritance
  • java.lang.Object
  • rx.internal.operators.OnSubscribeTimeoutTimedWithFallback.TimeoutMainSubscriber.TimeoutTask
All Implemented Interfaces
rx.functions.Action0, rx.functions.Action, rx.functions.Function

Field Summary

Modifier and TypeField and Description
pack-priv final long

Constructor Summary

AccessConstructor and Description
pack-priv
TimeoutTask(long idx)

Method Summary

Modifier and TypeMethod and Description
public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

idxback to summary
pack-priv final long idx

Constructor Detail

TimeoutTaskback to summary
pack-priv TimeoutTask(long idx)

Method Detail

callback to summary
public void call()

Implements rx.functions.Action0.call.

Annotations
@Override