public abstract class**RequestFinishedInfo** extends Object  
Information about a finished request. Passed to[RequestFinishedInfo.Listener](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/RequestFinishedInfo.Listener.html).

To associate the data with the original request, use[UrlRequest.Builder.addRequestAnnotation(Object)](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Builder.html#addRequestAnnotation(java.lang.Object))to add a unique identifier when creating the request, and call[getAnnotations()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/RequestFinishedInfo.html#getAnnotations())when the[RequestFinishedInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/RequestFinishedInfo.html)is received to retrieve the identifier.  

### Nested Class Summary

|-------|---|---|----------------------------------------------------------------------|
| class | [RequestFinishedInfo.Listener](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/RequestFinishedInfo.Listener.html) || Listens for finished requests for the purpose of collecting metrics. |

### Constant Summary

|-----|--------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------|
| int | [CANCELED](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/RequestFinishedInfo.html#CANCELED)   | Reason value indicating that the request was canceled.                |
| int | [FAILED](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/RequestFinishedInfo.html#FAILED)       | Reason value indicating that the request failed or returned an error. |
| int | [SUCCEEDED](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/RequestFinishedInfo.html#SUCCEEDED) | Reason value indicating that the request succeeded.                   |

### Public Constructor Summary

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

### Public Method Summary

|--------------------------------------------------------------------------------------------------------------------------------------| |
| abstract Collection\<Object\>                                                                                                        | [getAnnotations](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/RequestFinishedInfo.html#getAnnotations())() Returns the objects that the caller has supplied when initiating the request, using[UrlRequest.Builder.addRequestAnnotation(Object)](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Builder.html#addRequestAnnotation(java.lang.Object)).                                                                                                                                                                                           |
| abstract[CronetException](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/CronetException.html) | [getException](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/RequestFinishedInfo.html#getException())() If the request failed, returns the same[CronetException](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/CronetException.html)provided to[UrlRequest.Callback.onFailed(UrlRequest, UrlResponseInfo, CronetException)](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)). |
| abstract int                                                                                                                         | [getFinishedReason](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/RequestFinishedInfo.html#getFinishedReason())() Returns the reason why the request finished.                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| abstract[UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html) | [getResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/RequestFinishedInfo.html#getResponseInfo())() Returns a[UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)for the request, if its response had started.                                                                                                                                                                                                                                                                                                 |
| abstract String                                                                                                                      | [getUrl](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/RequestFinishedInfo.html#getUrl())() Returns the request's original URL.                                                                                                                                                                                                                                                                                                                                                                                                                                                                  |

### Inherited Method Summary

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()                    |

## Constants

#### public static final int**CANCELED**

Reason value indicating that the request was canceled. Returned from[getFinishedReason()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/RequestFinishedInfo.html#getFinishedReason()).  
Constant Value:2  

#### public static final int**FAILED**

Reason value indicating that the request failed or returned an error. Returned from[getFinishedReason()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/RequestFinishedInfo.html#getFinishedReason()).  
Constant Value:1  

#### public static final int**SUCCEEDED**

Reason value indicating that the request succeeded. Returned from[getFinishedReason()](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/RequestFinishedInfo.html#getFinishedReason()).  
Constant Value:0

## Public Constructors

#### public**RequestFinishedInfo**()

<br />

## Public Methods

#### public abstract Collection\<Object\>**getAnnotations**()

Returns the objects that the caller has supplied when initiating the request, using[UrlRequest.Builder.addRequestAnnotation(Object)](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlRequest.Builder.html#addRequestAnnotation(java.lang.Object)). Annotations can be used to associate a[RequestFinishedInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/RequestFinishedInfo.html)with the original request or type of request.  

##### Returns

- annotations supplied when creating the request  

#### public abstract[CronetException](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/CronetException.html)**getException**()

If the request failed, returns the same[CronetException](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/CronetException.html)provided to[UrlRequest.Callback.onFailed(UrlRequest, UrlResponseInfo, CronetException)](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)).  

##### Returns

- the request's[CronetException](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/CronetException.html), if the request failed  

#### public abstract int**getFinishedReason**()

Returns the reason why the request finished.  

##### Returns

- one of[SUCCEEDED](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/RequestFinishedInfo.html#SUCCEEDED),[FAILED](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/RequestFinishedInfo.html#FAILED), or[CANCELED](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/RequestFinishedInfo.html#CANCELED)  

#### public abstract[UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)**getResponseInfo**()

Returns a[UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)for the request, if its response had started.  

##### Returns

- [UrlResponseInfo](https://developer.android.com/develop/connectivity/cronet/reference/org/chromium/net/UrlResponseInfo.html)for the request, if its response had started.  

#### public abstract String**getUrl**()

Returns the request's original URL.  

##### Returns

- the request's original URL