T - the type of the response objectpublic class RxObservableCallAdapter<T> extends java.lang.Object implements CallAdapter<T,rx.Observable<T>>
This adapter implementation allows for declaring interface methods that return instances of Observable, both for single and batched request calls.
To install, call com.pcloud.networking.api.ApiComposer.Builder#addAdapterFactory(Factory) with the FACTORY object.
CallAdapter.Factory| Modifier and Type | Field and Description |
|---|---|
static CallAdapter.Factory |
FACTORY |
| Modifier and Type | Method and Description |
|---|---|
rx.Observable<T> |
adapt(Call<T> call)
Adapt a Call to a R
|
rx.Observable<T> |
adapt(MultiCall<?,T> call)
Adapt a MultiCall to a R
|
java.lang.reflect.Type |
responseType() |
public static final CallAdapter.Factory FACTORY
public java.lang.reflect.Type responseType()
responseType in interface CallAdapter<T,rx.Observable<T>>public rx.Observable<T> adapt(Call<T> call)
CallAdapteradapt in interface CallAdapter<T,rx.Observable<T>>call - a non-null Call instancepublic rx.Observable<T> adapt(MultiCall<?,T> call)
CallAdapteradapt in interface CallAdapter<T,rx.Observable<T>>call - a non-null MultiCall instance