A completion listener for accepting the results of a Cronet request asynchronously.
To attach to a Cronet request use InMemoryTransformCronetCallback
and call InMemoryTransformCronetCallback.addCompletionListener(CronetRequestCompletionListener super T>)
.
Public Method Summary
abstract void | |
abstract void |
onFailed(UrlResponseInfo info, CronetException exception)
Invoked if request failed for any reason after starting the request.
|
abstract void |
Public Methods
public abstract void onCanceled (UrlResponseInfo info)
Invoked if request was canceled via UrlRequest#cancel
. Once invoked, no other methods
will be invoked on this object.
Parameters
info | Response information. May be null if no response was received.
|
---|
public abstract void onFailed (UrlResponseInfo info, CronetException exception)
Invoked if request failed for any reason after starting the request. Once invoked, no other
methods will be invoked on this object. exception
provides information about the
failure.
Parameters
info | Response information. May be null if no response was received. |
---|---|
exception | detailed information about the error that occurred. |
public abstract void onSucceeded (UrlResponseInfo info, T body)
Invoked when request is completed successfully. Once invoked, no other methods will be invoked on this object.
Parameters
info | Response information. |
---|---|
body | The response body transformed to the desired type. |