T - the source and result element typeU - the window observable's type, irrelevantpublic static class Throttle.ByObservable<T,U> extends java.lang.Object implements Observable<T>
Exception semantics: exceptions from the source and windows are forwarded immediately and the sequence is terminated.
The window close is triggered by either a next or finish event.
| Modifier and Type | Field and Description |
|---|---|
protected Func1<? super T,? extends Observable<U>> |
durationSelector |
protected Observable<? extends T> |
source |
| Constructor and Description |
|---|
ByObservable(Observable<? extends T> source,
Func1<? super T,? extends Observable<U>> durationSelector)
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 Func1<? super T,? extends Observable<U>> durationSelector
public ByObservable(Observable<? extends T> source, Func1<? super T,? extends Observable<U>> durationSelector)
source - the source sequencedurationSelector - the duration selector.@Nonnull public java.io.Closeable register(Observer<? super T> observer)
Observableregister in interface Observable<T>observer - the observer of Ts or any supertype of it