Skip to content

Commit

Permalink
Adapt fluent impls to use native observables
Browse files Browse the repository at this point in the history
  • Loading branch information
jianghaolu committed Aug 27, 2016
1 parent e9fa2de commit 866a220
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions client-runtime/src/main/java/com/microsoft/rest/ServiceCall.java
Original file line number Diff line number Diff line change
Expand Up @@ -131,31 +131,6 @@ protected void setSubscription(Subscription subscription) {
this.subscription = subscription;
}

/**
* Get an RxJava Observable object for the response.
*
* @return the Observable
*/
public Observable<T> observable() {
return Observable.from(this)
.map(new Func1<ServiceResponse<T>, T>() {
@Override
public T call(ServiceResponse<T> tServiceResponse) {
return tServiceResponse.getBody();
}
});
}

/**
* Get an RxJava Observable object for the response bound on a scheduler.
*
* @param scheduler the scheduler to bind to
* @return the Observable
*/
public Observable<T> observable(Scheduler scheduler) {
return observable().subscribeOn(scheduler);
}

/**
* Invoke this method to report completed, allowing
* {@link AbstractFuture#get()} to be unblocked.
Expand Down

0 comments on commit 866a220

Please sign in to comment.