All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.univapay.sdk.builders.Request Maven / Gradle / Ivy

There is a newer version: 0.2.35
Show newest version
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