public class DataSiftApiClient extends Object
| Modifier and Type | Field and Description |
|---|---|
protected DataSiftConfig |
config |
| Constructor and Description |
|---|
DataSiftApiClient(DataSiftConfig config) |
| Modifier and Type | Method and Description |
|---|---|
protected <T extends DataSiftResult> |
failNotify(FutureData<T> response,
Throwable cause) |
ParamBuilder |
newParams() |
protected <T extends DataSiftResult> |
newRequestCallback(FutureData<T> future,
T instance,
DataSiftConfig config) |
protected <T extends DataSiftResult> |
performRequest(FutureData<T> response,
io.higgs.http.client.Request request) |
protected <T extends DataSiftResult,A extends DataSiftResult> |
unwrapFuture(FutureData<T> futureToUnwrap,
FutureData<A> futureReturnedToUser,
A expectedInstance,
FutureResponse<T> responseToExecuteOnSuccess)
To support futures being passed as parameters, this method adds a listener to the unprocessed future that has
been passed as a parameter.
|
protected DataSiftConfig config
public DataSiftApiClient(DataSiftConfig config)
public ParamBuilder newParams()
protected <T extends DataSiftResult> io.higgs.core.func.Function2<String,io.higgs.http.client.Response> newRequestCallback(FutureData<T> future, T instance, DataSiftConfig config)
protected <T extends DataSiftResult,A extends DataSiftResult> void unwrapFuture(FutureData<T> futureToUnwrap, FutureData<A> futureReturnedToUser, A expectedInstance, FutureResponse<T> responseToExecuteOnSuccess)
T - A - futureToUnwrap - the unprocessed future which needs to be unwrappedfutureReturnedToUser - the future that has been returned to the user and which callbacks need to be
triggered onexpectedInstance - the instance of the result type to use in failure scenariosresponseToExecuteOnSuccess - a future response object which contains the code which will execute once the
wrapped future has been unwrapped and its result is successfulprotected <T extends DataSiftResult> void performRequest(FutureData<T> response, io.higgs.http.client.Request request)
protected <T extends DataSiftResult> void failNotify(FutureData<T> response, Throwable cause)
Copyright © 2015. All Rights Reserved.