public interface**CronetRequestCompletionListener**  
A completion listener for accepting the results of a Cronet request asynchronously.

To attach to a Cronet request use[InMemoryTransformCronetCallback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/InMemoryTransformCronetCallback.html)and call[InMemoryTransformCronetCallback.addCompletionListener(CronetRequestCompletionListener)](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/InMemoryTransformCronetCallback.html#addCompletionListener(org.chromium.net.apihelpers.CronetRequestCompletionListener<?%20super%20T>)).  

### Public Method Summary

|---------------| |
| abstract void | [onCanceled](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/CronetRequestCompletionListener.html#onCanceled(org.chromium.net.UrlResponseInfo))([UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info) Invoked if request was canceled via`UrlRequest#cancel`.                                                                                                                                                                                    |
| abstract void | [onFailed](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/CronetRequestCompletionListener.html#onFailed(org.chromium.net.UrlResponseInfo,%20org.chromium.net.CronetException))([UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info,[CronetException](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/CronetException.html)exception) Invoked if request failed for any reason after starting the request. |
| abstract void | [onSucceeded](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/CronetRequestCompletionListener.html#onSucceeded(org.chromium.net.UrlResponseInfo,%20T))([UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info, T body) Invoked when request is completed successfully.                                                                                                                                                                             |

## Public Methods

#### public abstract void**onCanceled**([UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)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](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info,[CronetException](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/CronetException.html)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](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)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. |
|------|----------------------------------------------------|