T
- the type of the response objectpublic class RxSingleCallAdapter<T> extends java.lang.Object implements CallAdapter<T,rx.Single<T>>
This adapter implementation allows for declaring interface methods that return instances of Single, 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.Single<T> |
adapt(Call<T> call)
Adapt a Call to a R
|
rx.Single<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.Single<T>>
public rx.Single<T> adapt(Call<T> call)
CallAdapter
adapt
in interface CallAdapter<T,rx.Single<T>>
call
- a non-null Call instancepublic rx.Single<T> adapt(MultiCall<?,T> call)
CallAdapter
adapt
in interface CallAdapter<T,rx.Single<T>>
call
- a non-null MultiCall instance