T
- The return typepublic interface ApiCallback<T>
Modifier and Type | Method and Description |
---|---|
void |
onDownloadProgress(long bytesRead,
long contentLength,
boolean done)
This is called when the API downlond processing.
|
void |
onFailure(ApiException e,
int statusCode,
Map<String,List<String>> responseHeaders)
This is called when the API call fails.
|
void |
onSuccess(T result,
int statusCode,
Map<String,List<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.
|
void onFailure(ApiException e, int statusCode, Map<String,List<String>> responseHeaders)
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 nullvoid onSuccess(T result, int statusCode, Map<String,List<String>> responseHeaders)
result
- The result deserialized from responsestatusCode
- Status code of the responseresponseHeaders
- Headers of the responsevoid onUploadProgress(long bytesWritten, long contentLength, boolean done)
bytesWritten
- bytes WrittencontentLength
- content length of request bodydone
- write endvoid onDownloadProgress(long bytesRead, long contentLength, boolean done)
bytesRead
- bytes ReadcontentLength
- content lenngth of the responsedone
- Read endCopyright © 2022. All rights reserved.