T - the element tyepublic static class Timeout.Switch<T> extends java.lang.Object implements Observable<T>
| Modifier and Type | Field and Description |
|---|---|
protected Observable<? extends T> |
other |
protected Scheduler |
pool |
protected Observable<? extends T> |
source |
protected long |
time |
protected java.util.concurrent.TimeUnit |
unit |
| Constructor and Description |
|---|
Switch(Observable<? extends T> source,
long time,
java.util.concurrent.TimeUnit unit,
Observable<? extends T> other,
Scheduler pool)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.io.Closeable |
register(Observer<? super T> observer)
Registers an observer for the notification of Ts.
|
protected final Observable<? extends T> source
protected final long time
protected final java.util.concurrent.TimeUnit unit
protected final Scheduler pool
protected final Observable<? extends T> other
public Switch(Observable<? extends T> source, long time, java.util.concurrent.TimeUnit unit, Observable<? extends T> other, Scheduler pool)
source - the source sequencetime - the timeout for each elementunit - the tim unitother - the other stream to switch to in case of timeoutpool - the scheduler for the timed operations@Nonnull
public java.io.Closeable register(@Nonnull
Observer<? super T> observer)
Observableregister in interface Observable<T>observer - the observer of Ts or any supertype of it