Package com.orbipay.paymentsapi.internal
Interface ApiCallback<T>
-
public interface ApiCallback<T>
This class subject to change without prior notice, Please dont use this class directly.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onDownloadProgress(long bytesRead, long contentLength, boolean done)
This is called when the API downlond processing.void
onFailure(ApiException e, int statusCode, java.util.Map<java.lang.String,java.util.List<java.lang.String>> responseHeaders)
This is called when the API call fails.void
onSuccess(T result, int statusCode, java.util.Map<java.lang.String,java.util.List<java.lang.String>> responseHeaders)
This is called when the API call succeeded.void
onUploadProgress(long bytesWritten, long contentLength, boolean done)
This is called when the API upload processing.
-
-
-
Method Detail
-
onFailure
void onFailure(ApiException e, int statusCode, java.util.Map<java.lang.String,java.util.List<java.lang.String>> responseHeaders)
This is called when the API call fails.- Parameters:
e
- The exception causing the failurestatusCode
- Status code of the response if available, otherwise it would be 0responseHeaders
- Headers of the response if available, otherwise it would be null
-
onSuccess
void onSuccess(T result, int statusCode, java.util.Map<java.lang.String,java.util.List<java.lang.String>> responseHeaders)
This is called when the API call succeeded.- Parameters:
result
- The result deserialized from responsestatusCode
- Status code of the responseresponseHeaders
- Headers of the response
-
onUploadProgress
void onUploadProgress(long bytesWritten, long contentLength, boolean done)
This is called when the API upload processing.- Parameters:
bytesWritten
- bytes WrittencontentLength
- content length of request bodydone
- write end
-
onDownloadProgress
void onDownloadProgress(long bytesRead, long contentLength, boolean done)
This is called when the API downlond processing.- Parameters:
bytesRead
- bytes ReadcontentLength
- content lenngth of the responsedone
- Read end
-
-