Subscribe to subscribe events
Common subscription events
/*** OnNext: Call this method as long as the Observable launches a project. This method uses the items issued by Observable as parameters. * OnError: This method is called to indicate that it has not generated the expected data or encountered some other errors * onCompleted: If the Observable onNext has not encountered any errors, it will call this method after the last time of the call. * OnSubscribe provides Observer with a means of cancellation (Disposal) */Disposable subscribe (Consumer
OnNext) {return subscribe (onNext, Functions. ON_ERROR_MISSING, Functions. EMPTY_ACTION, Functions. emptyConsumer ();} Disposable subscribe (Consumer
OnNext, Consumer
OnError) {return subscribe (onNext, onError, Functions. EMPTY_ACTION, Functions. emptyConsumer ();} Disposable subscribe (Consumer
OnNext, Consumer
OnError, Action onComplete) {return subscribe (onNext, onError, onComplete, Functions. emptyConsumer ();} Disposable subscribe (Consumer
OnNext, Consumer
OnError, Action onComplete, Consumer
OnSubscribe) {//... subscribe (observer)} void subscribe (Observer
Observer)
We can see from the source code that the end is through subscribe (Observer