Package org.openapitools.client
Interface ApiCallback<T>
- Type Parameters:
- T- The return type
public interface ApiCallback<T>
Callback for asynchronous API call.
- 
Method SummaryModifier and TypeMethodDescriptionvoidonDownloadProgress(long bytesRead, long contentLength, boolean done) This is called when the API download processing.voidThis is called when the API call fails.voidThis is called when the API call succeeded.voidonUploadProgress(long bytesWritten, long contentLength, boolean done) This is called when the API upload processing.
- 
Method Details- 
onFailureThis is called when the API call fails.- Parameters:
- e- The exception causing the failure
- statusCode- Status code of the response if available, otherwise it would be 0
- responseHeaders- Headers of the response if available, otherwise it would be null
 
- 
onSuccessThis is called when the API call succeeded.- Parameters:
- result- The result deserialized from response
- statusCode- Status code of the response
- responseHeaders- Headers of the response
 
- 
onUploadProgressvoid onUploadProgress(long bytesWritten, long contentLength, boolean done) This is called when the API upload processing.- Parameters:
- bytesWritten- bytes Written
- contentLength- content length of request body
- done- write end
 
- 
onDownloadProgressvoid onDownloadProgress(long bytesRead, long contentLength, boolean done) This is called when the API download processing.- Parameters:
- bytesRead- bytes Read
- contentLength- content length of the response
- done- Read end
 
 
-