T
- the response typepublic abstract class RequestExecutor<T>
extends java.lang.Object
Constructor and Description |
---|
RequestExecutor() |
Modifier and Type | Method and Description |
---|---|
T |
execute()
Executes created request synchronously.
|
void |
execute(CloudCallback<T> callback)
Executes created request asynchronously and invokes callback with the result.
|
protected abstract java.util.Map<java.lang.String,java.lang.String> |
params()
Composes the request's parameters in map.
|
protected abstract retrofit2.Call<T> |
prepareCall()
Prepares a request to execute.
|
public T execute() throws java.io.IOException, KontaktCloudException
java.io.IOException
- exceptionKontaktCloudException
- exceptionpublic void execute(CloudCallback<T> callback)
callback
- the callback object.protected abstract retrofit2.Call<T> prepareCall()
protected abstract java.util.Map<java.lang.String,java.lang.String> params()