T - Type of the data model classpublic abstract class JsonBatchCallback<T> extends Object implements BatchCallback<T,GoogleJsonErrorContainer>
Sample use:
batch.queue(volumesList.buildHttpRequest(), Volumes.class, GoogleJsonErrorContainer.class,
new JsonBatchCallback<Volumes>() {
public void onSuccess(Volumes volumes, HttpHeaders responseHeaders) {
log("Success");
printVolumes(volumes.getItems());
}
public void onFailure(GoogleJsonError e, HttpHeaders responseHeaders) {
log(e.getMessage());
}
});
| Constructor and Description |
|---|
JsonBatchCallback() |
| Modifier and Type | Method and Description |
|---|---|
void |
onFailure(GoogleJsonErrorContainer e,
com.google.api.client.http.HttpHeaders responseHeaders)
Called if the individual batch response is unsuccessful.
|
abstract void |
onFailure(GoogleJsonError e,
com.google.api.client.http.HttpHeaders responseHeaders)
Called if the individual batch response is unsuccessful.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitonSuccesspublic final void onFailure(GoogleJsonErrorContainer e, com.google.api.client.http.HttpHeaders responseHeaders) throws IOException
BatchCallbackonFailure in interface BatchCallback<T,GoogleJsonErrorContainer>e - instance of data class representing the error response contentresponseHeaders - Headers of the batch responseIOExceptionpublic abstract void onFailure(GoogleJsonError e, com.google.api.client.http.HttpHeaders responseHeaders) throws IOException
e - Google JSON error response contentresponseHeaders - Headers of the batch responseIOExceptionCopyright © 2010-2013 Google. All Rights Reserved.