create Action Subscriber
fun <T> createActionSubscriber(onNext: Action1<in T>, onError: Action1<Throwable> = Action1 {}, onCompleted: Action0 = Action0 {}): Subscriber<T>
Creates a subscriber that forwards the onXXX method calls to callbacks.
Return
ActionSubscriber instance
Parameters
on Next
An Observable calls this method whenever the Observable emits an item. This method takes as a parameter the item emitted by the Observable.
on Error
An Observable calls this method to indicate that it has failed to generate the expected data or has encountered some other error.
on Completed
An Observable calls this method after it has called onNext for the final time, if it has not encountered any errors.