|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
T
- Type of the data model classE
- Type of the error data model classpublic interface BatchCallback<T,E>
Callback for an individual batch response.
Sample use:
batch.queue(volumesList.buildHttpRequest(), Volumes.class, GoogleJsonErrorContainer.class, new BatchCallback<Volumes, GoogleJsonErrorContainer>() { public void onSuccess(Volumes volumes, GoogleHeaders responseHeaders) { log("Success"); printVolumes(volumes.getItems()); } public void onFailure(GoogleJsonErrorContainer e, GoogleHeaders responseHeaders) { log(e.getError().getMessage()); } });
Method Summary | |
---|---|
void |
onFailure(E e,
GoogleHeaders responseHeaders)
Called if the individual batch response is unsuccessful. |
void |
onSuccess(T t,
GoogleHeaders responseHeaders)
Called if the individual batch response is successful. |
Method Detail |
---|
void onSuccess(T t, GoogleHeaders responseHeaders)
t
- instance of the parsed data model classresponseHeaders
- Headers of the batch responsevoid onFailure(E e, GoogleHeaders responseHeaders) throws IOException
e
- instance of data class representing the error response contentresponseHeaders
- Headers of the batch response
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |