com.univapay.sdk.builders.Request Maven / Gradle / Ivy
package com.univapay.sdk.builders;
import com.univapay.sdk.models.errors.TooManyRequestsException;
import com.univapay.sdk.models.errors.UnivapayException;
import com.univapay.sdk.utils.Sleeper;
import com.univapay.sdk.utils.UnivapayCallback;
import java.io.IOException;
public interface Request {
/**
* Executes the request, processing asynchronously and calling the corresponding callback
* (response/failure)
*
* @param callback to be executed
* @return a handle to cancel the dispatched request
*/
Cancelable dispatch(UnivapayCallback callback);
E dispatch() throws IOException, UnivapayException, TooManyRequestsException;
E dispatch(int maxRetry, Sleeper sleeper)
throws IOException, UnivapayException, TooManyRequestsException, InterruptedException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy