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, wait
onSuccess
public final void onFailure(GoogleJsonErrorContainer e, com.google.api.client.http.HttpHeaders responseHeaders) throws IOException
BatchCallback
onFailure
in interface BatchCallback<T,GoogleJsonErrorContainer>
e
- instance of data class representing the error response contentresponseHeaders
- Headers of the batch responseIOException
public abstract void onFailure(GoogleJsonError e, com.google.api.client.http.HttpHeaders responseHeaders) throws IOException
e
- Google JSON error response contentresponseHeaders
- Headers of the batch responseIOException
Copyright © 2010–2019 Google. All rights reserved.