public abstract class**ImplicitFlowControlCallback** extends[UrlRequest.Callback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html)  

|---|---|---|
| Known Direct Subclasses [InMemoryTransformCronetCallback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/InMemoryTransformCronetCallback.html)\<T\> |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------| | [InMemoryTransformCronetCallback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/InMemoryTransformCronetCallback.html)\<T\> | An abstract Cronet callback that reads the entire body to memory and optionally deserializes the body before passing it back to the issuer of the HTTP request. | |||

|---|---|---|
| Known Indirect Subclasses [ByteArrayCronetCallback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/ByteArrayCronetCallback.html),[JsonCronetCallback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/JsonCronetCallback.html),[StringCronetCallback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/StringCronetCallback.html) |---------------------------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | [ByteArrayCronetCallback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/ByteArrayCronetCallback.html) | A specialization of[InMemoryTransformCronetCallback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/InMemoryTransformCronetCallback.html)which returns the body bytes verbatim without any interpretation. | | [JsonCronetCallback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/JsonCronetCallback.html)           | A specialization of[InMemoryTransformCronetCallback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/InMemoryTransformCronetCallback.html)that interprets the response body as JSON.                        | | [StringCronetCallback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/StringCronetCallback.html)       | A specialization of[InMemoryTransformCronetCallback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/InMemoryTransformCronetCallback.html)that interprets the response body as a string.                    | |||

An implementation of[UrlRequest.Callback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html)that takes away the difficulty of managing the request lifecycle away, and automatically proceeds to read the response entirely.  

### Public Constructor Summary

|---|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|   | [ImplicitFlowControlCallback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/ImplicitFlowControlCallback.html#ImplicitFlowControlCallback())() |

### Public Method Summary

|------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| final void | [onCanceled](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/ImplicitFlowControlCallback.html#onCanceled(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo))([UrlRequest](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html)request,[UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info) Invoked if request was canceled via[UrlRequest.cancel()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html#cancel()).                                                                                                                                                                            |
| final void | [onFailed](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/ImplicitFlowControlCallback.html#onFailed(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo,%20org.chromium.net.CronetException))([UrlRequest](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html)request,[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)error) Invoked if request failed for any reason after[UrlRequest.start()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html#start()). |
| final void | [onReadCompleted](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/ImplicitFlowControlCallback.html#onReadCompleted(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo,%20java.nio.ByteBuffer))([UrlRequest](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html)request,[UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info, ByteBuffer byteBuffer) Invoked whenever part of the response body has been read.                                                                                                                                                                                                                                   |
| final void | [onRedirectReceived](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/ImplicitFlowControlCallback.html#onRedirectReceived(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo,%20java.lang.String))([UrlRequest](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html)request,[UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info, String newLocationUrl) Invoked whenever a redirect is encountered.                                                                                                                                                                                                                                              |
| final void | [onResponseStarted](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/ImplicitFlowControlCallback.html#onResponseStarted(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo))([UrlRequest](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html)request,[UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info) Invoked when the final set of headers, after all redirects, is received.                                                                                                                                                                                                                                                              |
| final void | [onSucceeded](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/ImplicitFlowControlCallback.html#onSucceeded(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo))([UrlRequest](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html)request,[UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info) Invoked when request is completed successfully.                                                                                                                                                                                                                                                                                                   |

### Protected Method Summary

|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| abstract void    | [onBodyChunkRead](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/ImplicitFlowControlCallback.html#onBodyChunkRead(org.chromium.net.UrlResponseInfo,%20java.nio.ByteBuffer))([UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info, ByteBuffer bodyChunk) Invoked whenever part of the response body has been read.                                                                                                                                                                                                                                        |
| abstract void    | [onCanceled](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/ImplicitFlowControlCallback.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()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html#cancel()).                                                                                                                                                                                |
| abstract void    | [onFailed](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/ImplicitFlowControlCallback.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[UrlRequest.start()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html#start()). |
| abstract void    | [onResponseStarted](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/ImplicitFlowControlCallback.html#onResponseStarted(org.chromium.net.UrlResponseInfo))([UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info) Invoked when the final set of headers, after all redirects, is received.                                                                                                                                                                                                                                                                  |
| abstract void    | [onSucceeded](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/ImplicitFlowControlCallback.html#onSucceeded(org.chromium.net.UrlResponseInfo))([UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info) Invoked when request is completed successfully.                                                                                                                                                                                                                                                                                                       |
| abstract boolean | [shouldFollowRedirect](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/ImplicitFlowControlCallback.html#shouldFollowRedirect(org.chromium.net.UrlResponseInfo,%20java.lang.String))([UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info, String newLocationUrl) Invoked whenever a redirect is encountered.                                                                                                                                                                                                                                              |

### Inherited Method Summary

From class[org.chromium.net.UrlRequest.Callback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html)  

|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| void          | [onCanceled](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html#onCanceled(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo))([UrlRequest](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html)request,[UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info) Invoked if request was canceled via[UrlRequest.cancel()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html#cancel()).                                                                                                                                                                            |
| abstract void | [onFailed](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html#onFailed(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo,%20org.chromium.net.CronetException))([UrlRequest](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html)request,[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)error) Invoked if request failed for any reason after[UrlRequest.start()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html#start()). |
| abstract void | [onReadCompleted](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html#onReadCompleted(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo,%20java.nio.ByteBuffer))([UrlRequest](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html)request,[UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info, ByteBuffer byteBuffer) Invoked whenever part of the response body has been read.                                                                                                                                                                                                                                   |
| abstract void | [onRedirectReceived](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html#onRedirectReceived(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo,%20java.lang.String))([UrlRequest](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html)request,[UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info, String newLocationUrl) Invoked whenever a redirect is encountered.                                                                                                                                                                                                                                              |
| abstract void | [onResponseStarted](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html#onResponseStarted(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo))([UrlRequest](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html)request,[UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info) Invoked when the final set of headers, after all redirects, is received.                                                                                                                                                                                                                                                              |
| abstract void | [onSucceeded](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html#onSucceeded(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo))([UrlRequest](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html)request,[UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info) Invoked when request is completed successfully.                                                                                                                                                                                                                                                                                                   |

From class java.lang.Object  

|------------------|---------------------------|
| Object           | clone()                   |
| boolean          | equals(Object arg0)       |
| void             | finalize()                |
| final Class\<?\> | getClass()                |
| int              | hashCode()                |
| final void       | notify()                  |
| final void       | notifyAll()               |
| String           | toString()                |
| final void       | wait(long arg0, int arg1) |
| final void       | wait(long arg0)           |
| final void       | wait()                    |

## Public Constructors

#### public**ImplicitFlowControlCallback**()

<br />

## Public Methods

#### public final void**onCanceled**([UrlRequest](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html)request,[UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info)

Invoked if request was canceled via[UrlRequest.cancel()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html#cancel()). Once invoked, no other[UrlRequest.Callback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html)methods will be invoked. Default implementation takes no action.  

##### Parameters

| request |                   Request that was canceled.                   |
|  info   | Response information. May be`null`if no response was received. |
|---------|----------------------------------------------------------------|

#### public final void**onFailed**([UrlRequest](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html)request,[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)error)

Invoked if request failed for any reason after[UrlRequest.start()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html#start()). Once invoked, no other[UrlRequest.Callback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html)methods will be invoked.`error`provides information about the failure.  

##### Parameters

| request |                      Request that failed.                      |
|  info   | Response information. May be`null`if no response was received. |
|  error  |                    information about error.                    |
|---------|----------------------------------------------------------------|

#### public final void**onReadCompleted**([UrlRequest](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html)request,[UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info, ByteBuffer byteBuffer)

Invoked whenever part of the response body has been read. Only part of the buffer may be populated, even if the entire response body has not yet been consumed. With the exception of[onCanceled()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html#onCanceled(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo)), no other[UrlRequest.Callback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html)method will be invoked for the request, including[onSucceeded()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html#onSucceeded(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo))and[onFailed()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html#onFailed(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo,%20org.chromium.net.CronetException)), until[UrlRequest.read()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html#read(java.nio.ByteBuffer))is called to attempt to continue reading the response body.  

##### Parameters

|  request   |                                                                                                                                                 Request that received data.                                                                                                                                                 |
|    info    |                                                                                                                                                    Response information.                                                                                                                                                    |
| byteBuffer | The buffer that was passed in to[UrlRequest.read()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html#read(java.nio.ByteBuffer)), now containing the received data. The buffer's position is updated to the end of the received data. The buffer's limit is not changed. |
|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|

##### Throws

| Exception |   |
|-----------|---|

#### public final void**onRedirectReceived**([UrlRequest](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html)request,[UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info, String newLocationUrl)

Invoked whenever a redirect is encountered. This will only be invoked between the call to[UrlRequest.start()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html#start())and[onResponseStarted()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html#onResponseStarted(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo)). The body of the redirect response, if it has one, will be ignored. The redirect will not be followed until the URLRequest's[UrlRequest.followRedirect()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html#followRedirect())method is called, either synchronously or asynchronously.  

##### Parameters

|    request     |       Request being redirected.       |
|      info      |         Response information.         |
| newLocationUrl | Location where request is redirected. |
|----------------|---------------------------------------|

##### Throws

| Exception |   |
|-----------|---|

#### public final void**onResponseStarted**([UrlRequest](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html)request,[UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info)

Invoked when the final set of headers, after all redirects, is received. Will only be invoked once for each request. With the exception of[onCanceled()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html#onCanceled(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo)), no other[UrlRequest.Callback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html)method will be invoked for the request, including[onSucceeded()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html#onSucceeded(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo))and[onFailed()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html#onFailed(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo,%20org.chromium.net.CronetException)), until[UrlRequest.read()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html#read(java.nio.ByteBuffer))is called to attempt to start reading the response body.  

##### Parameters

| request | Request that started to get response. |
|  info   |         Response information.         |
|---------|---------------------------------------|

##### Throws

| Exception |   |
|-----------|---|

#### public final void**onSucceeded**([UrlRequest](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html)request,[UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info)

Invoked when request is completed successfully. Once invoked, no other[UrlRequest.Callback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html)methods will be invoked.  

##### Parameters

| request | Request that succeeded. |
|  info   |  Response information.  |
|---------|-------------------------|

## Protected Methods

#### protected abstract void**onBodyChunkRead**([UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info, ByteBuffer bodyChunk)

Invoked whenever part of the response body has been read. Only part of the buffer may be populated, even if the entire response body has not yet been consumed. The buffer is ready for reading. Buffers are reused internally so the implementing class shouldn't store the buffer or use it anywhere else than in the implementation of this method.  

##### Parameters

|   info    |                      Response information.                       |
| bodyChunk | The buffer that contains the received data, flipped for reading. |
|-----------|------------------------------------------------------------------|

##### Throws

| Exception | if an error occurs while processing a read completion.[onFailed(UrlRequest, UrlResponseInfo, CronetException)](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/ImplicitFlowControlCallback.html#onFailed(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo,%20org.chromium.net.CronetException))will be called with the thrown exception set as the cause of the[CallbackException](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/CallbackException.html). |
|-----------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|

#### protected 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()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html#cancel()). Once invoked, no other[UrlRequest.Callback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html)methods will be invoked.  

##### Parameters

| info | Response information. May be`null`if no response was received. |
|------|----------------------------------------------------------------|

#### protected 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[UrlRequest.start()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html#start()). Once invoked, no other[UrlRequest.Callback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html)methods will be invoked.`error`provides information about the failure.  

##### Parameters

|   info    | Response information. May be`null`if no response was received. |
| exception |                    information about error.                    |
|-----------|----------------------------------------------------------------|

#### protected abstract void**onResponseStarted**([UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info)

Invoked when the final set of headers, after all redirects, is received. Will only be invoked once for each request. It's guaranteed that Cronet doesn't start reading the body until this method returns.  

##### Parameters

| info | Response information. |
|------|-----------------------|

##### Throws

| Exception | if an error occurs while processing response start.[onFailed(UrlRequest, UrlResponseInfo, CronetException)](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/ImplicitFlowControlCallback.html#onFailed(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo,%20org.chromium.net.CronetException))will be called with the thrown exception set as the cause of the[CallbackException](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/CallbackException.html). |
|-----------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|

#### protected abstract void**onSucceeded**([UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info)

Invoked when request is completed successfully. Once invoked, no other[UrlRequest.Callback](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html)methods will be invoked.  

##### Parameters

| info | Response information. |
|------|-----------------------|

#### protected abstract boolean**shouldFollowRedirect**([UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)info, String newLocationUrl)

Invoked whenever a redirect is encountered. This will only be invoked between the call to[UrlRequest.start()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.html#start())and[onResponseStarted()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Callback.html#onResponseStarted(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo)). The body of the redirect response, if it has one, will be ignored.  

##### Parameters

|      info      |         Response information.         |
| newLocationUrl | Location where request is redirected. |
|----------------|---------------------------------------|

##### Returns

- true if the redirect should be followed, false if the request should be canceled.  

##### Throws

| Exception | if an error occurs while processing a redirect.[onFailed(UrlRequest, UrlResponseInfo, CronetException)](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/apihelpers/ImplicitFlowControlCallback.html#onFailed(org.chromium.net.UrlRequest,%20org.chromium.net.UrlResponseInfo,%20org.chromium.net.CronetException))will be called with the thrown exception set as the cause of the[CallbackException](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/CallbackException.html). |
|-----------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|