public abstract static class VKRequest.VKRequestListener
extends java.lang.Object
| Constructor and Description |
|---|
VKRequestListener() |
| Modifier and Type | Method and Description |
|---|---|
void |
attemptFailed(VKRequest request,
int attemptNumber,
int totalAttempts)
Called when request has failed attempt, and ready to do next attempt
|
void |
onComplete(VKResponse response)
Called if there were no HTTP or API errors, returns execution result.
|
void |
onError(VKError error)
Called immediately if there was API error, or after attempts tries if there was an HTTP error
|
void |
onProgress(VKRequest.VKProgressType progressType,
long bytesLoaded,
long bytesTotal)
Specify progress for uploading or downloading.
|
public void onComplete(VKResponse response)
response - response from VKRequestpublic void attemptFailed(VKRequest request, int attemptNumber, int totalAttempts)
request - Failed requestattemptNumber - Number of failed attempt, started from 1totalAttempts - Total request attempts defined for requestpublic void onError(VKError error)
error - error for VKRequestpublic void onProgress(VKRequest.VKProgressType progressType, long bytesLoaded, long bytesTotal)
progressType - type of progress (upload or download)bytesLoaded - total bytes loadedbytesTotal - total bytes suppose to be loaded