The Observable.subscribe()
method has many overloads as follows:
subscribe()
: This one ignores all the emissions from theObservable
instance and throws anOnErrorNotImplementedException
exception if there is anOnError
notification. This can be used to only trigger theOnSubscribe.call
behavior.subscribe(Action1<? super T>)
: This only subscribes toonNext()
method-triggered updates. It ignores theOnCompleted
notification and throws anOnErrorNotImplementedException
exception if there is anOnError
notification. It is not a good choice for real production code, because it is hard to guarantee that no errors will be thrown.subscribe(Action1<? super T>, Action1<Throwable>)
: This is the same as preceding one, but the second parameter is called if there is anOnError
notification.subscribe(Action1<? super T>,Action1<Throwable>, Action0)
: This is the same as the preceding one, but the third parameter is called onOnCompleted
notification...