Interface Observer<T>
- 
- Type Parameters:
 T- the type of item the Observer expects to observe
public interface Observer<T>Provides a mechanism for receiving push-based notifications.After an Observer calls
subscribeorsubscribemethod, theConnectorcalls the Observer'sonNext(T)method to provide notifications. TheConnectorshould call an Observer'sonCompleted()oronError(java.lang.Throwable)method exactly once. 
- 
- 
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonCompleted()Notifies the Observer that theConnectorhas finished sending push-based notifications.voidonError(java.lang.Throwable e)Notifies the Observer that theConnectorhas experienced an error condition.voidonNext(T t)Provides the Observer with a new item to observe. 
 - 
 
- 
- 
Method Detail
- 
onCompleted
void onCompleted()
Notifies the Observer that theConnectorhas finished sending push-based notifications.The
Connectorwill not call this method if it callsonError(java.lang.Throwable). 
- 
onError
void onError(java.lang.Throwable e)
Notifies the Observer that theConnectorhas experienced an error condition.If the
Connectorcalls this method, it will not thereafter callonNext(T)oronCompleted().- Parameters:
 e- the exception encountered by theConnector
 
- 
onNext
void onNext(T t)
Provides the Observer with a new item to observe.The
Connectormay call this method 0 or more times.The
Connectorwill not call this method again after it calls eitheronCompleted()oronError(java.lang.Throwable).- Parameters:
 t- the item emitted by theConnector
 
 - 
 
 -