-
-
Method Summary
Modifier and Type Method Description static <T> Observer<T>
empty()
Returns an inert Observer that does nothing in response to the emissions or notifications fromany {@code Observable}
it subscribes to but will throw an exception if its onError method is called.static <T> Observer<T>
create(Action1<out Object> onNext)
Creates an Observer that receives the emissions of any {@code Observable}
it subscribes to via onNext but ignores onCompleted notifications;it will throw an OnErrorNotImplementedException if onError is invoked.static <T> Observer<T>
create(Action1<out Object> onNext, Action1<Throwable> onError)
Creates an Observer that receives the emissions of any {@code Observable}
it subscribes to via onNext and handles any onError notification but ignoresan onCompleted notification.static <T> Observer<T>
create(Action1<out Object> onNext, Action1<Throwable> onError, Action0 onComplete)
Creates an Observer that receives the emissions of any {@code Observable}
it subscribes to via onNext and handles any onError or onCompleted notifications.-
-
Method Detail
-
create
static <T> Observer<T> create(Action1<out Object> onNext)
Creates an Observer that receives the emissions of any
{@code Observable}
it subscribes to via onNext but ignores onCompleted notifications;it will throw an OnErrorNotImplementedException if onError is invoked.- Parameters:
onNext
- a function that handles each item emitted by an{@code Observable}
-
create
static <T> Observer<T> create(Action1<out Object> onNext, Action1<Throwable> onError)
Creates an Observer that receives the emissions of any
{@code Observable}
it subscribes to via onNext and handles any onError notification but ignoresan onCompleted notification.- Parameters:
onNext
- a function that handles each item emitted by an{@code Observable}
onError
- a function that handles an error notification if one is sent by an{@code Observable}
-
create
static <T> Observer<T> create(Action1<out Object> onNext, Action1<Throwable> onError, Action0 onComplete)
Creates an Observer that receives the emissions of any
{@code Observable}
it subscribes to via onNext and handles any onError or onCompleted notifications.- Parameters:
onNext
- a function that handles each item emitted by an{@code Observable}
onError
- a function that handles an error notification if one is sent by an{@code Observable}
onComplete
- a function that handles a sequence complete notification if one is sent by an{@code Observable}
-
-
-
-