T
- Type of the data model classpublic abstract class JsonBatchCallback<T> extends java.lang.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 java.io.IOException
BatchCallback
onFailure
in interface BatchCallback<T,GoogleJsonErrorContainer>
e
- instance of data class representing the error response contentresponseHeaders
- Headers of the batch responsejava.io.IOException
public abstract void onFailure(GoogleJsonError e, com.google.api.client.http.HttpHeaders responseHeaders) throws java.io.IOException
e
- Google JSON error response contentresponseHeaders
- Headers of the batch responsejava.io.IOException
Copyright © 2010-2018 Google. All Rights Reserved.