T - the type of items expected to be observed by the
Observer
public class SerializedObserver<T> extends Objectimplements Observer <T>
onNext(T),
onCompleted(), and
onError(java.lang.Throwable).
When multiple threads are emitting and/or notifying they will be serialized by:
| Constructor and Description |
|---|
SerializedObserver(Observer
|
| Modifier and Type | Method and Description |
|---|---|
void |
onCompleted()
Notifies the Observer that the
Observable has finished sending push-based notifications.
|
void |
onError(Throwable
Notifies the Observer that the
Observable has experienced an error condition.
|
void |
onNext(T t)
Provides the Observer with a new item to observe.
|
public void onCompleted()
Observer
Observable has finished sending push-based notifications.
The Observable will not call this method if it calls Observer.
public void onError(Throwablee)
Observer
Observable has experienced an error condition.
If the Observable calls this method, it will not thereafter call Observer or Observer.
public void onNext(T t)
Observer
The Observable may call this method 0 or more times.
The Observable will not call this method again after it calls either Observer or Observer.