CronetRequestCompletionListener
Stay organized with collections
Save and categorize content based on your preferences.
Public Method Summary
abstract
void
|
|
abstract
void
|
|
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.
|
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.
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2023-10-26 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-26 UTC."],[],[],null,["# CronetRequestCompletionListener\n\npublic interface **CronetRequestCompletionListener** \nA completion listener for accepting the results of a Cronet request asynchronously.\n\nTo attach to a Cronet request use [InMemoryTransformCronetCallback](../../../../../reference/org/chromium/net/apihelpers/InMemoryTransformCronetCallback.html) and call [InMemoryTransformCronetCallback.addCompletionListener(CronetRequestCompletionListener)](../../../../../reference/org/chromium/net/apihelpers/InMemoryTransformCronetCallback.html#addCompletionListener(org.chromium.net.apihelpers.CronetRequestCompletionListener\u003c?%20super%20T\u003e)). \n\n### Public Method Summary\n\n|---------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| abstract void | [onCanceled](../../../../../reference/org/chromium/net/apihelpers/CronetRequestCompletionListener.html#onCanceled(org.chromium.net.UrlResponseInfo))([UrlResponseInfo](../../../../../reference/org/chromium/net/UrlResponseInfo.html) info) Invoked if request was canceled via `UrlRequest#cancel`. |\n| abstract void | [onFailed](../../../../../reference/org/chromium/net/apihelpers/CronetRequestCompletionListener.html#onFailed(org.chromium.net.UrlResponseInfo,%20org.chromium.net.CronetException))([UrlResponseInfo](../../../../../reference/org/chromium/net/UrlResponseInfo.html) info, [CronetException](../../../../../reference/org/chromium/net/CronetException.html) exception) Invoked if request failed for any reason after starting the request. |\n| abstract void | [onSucceeded](../../../../../reference/org/chromium/net/apihelpers/CronetRequestCompletionListener.html#onSucceeded(org.chromium.net.UrlResponseInfo,%20T))([UrlResponseInfo](../../../../../reference/org/chromium/net/UrlResponseInfo.html) info, T body) Invoked when request is completed successfully. |\n\nPublic Methods\n--------------\n\n#### public abstract void\n**onCanceled**\n([UrlResponseInfo](../../../../../reference/org/chromium/net/UrlResponseInfo.html) info)\n\nInvoked if request was canceled via `UrlRequest#cancel`. Once invoked, no other methods\nwill be invoked on this object. \n\n##### Parameters\n\n| info | Response information. May be `null` if no response was received. |\n|------|------------------------------------------------------------------|\n\n#### public abstract void\n**onFailed**\n([UrlResponseInfo](../../../../../reference/org/chromium/net/UrlResponseInfo.html) info, [CronetException](../../../../../reference/org/chromium/net/CronetException.html) exception)\n\nInvoked if request failed for any reason after starting the request. Once invoked, no other\nmethods will be invoked on this object. `exception` provides information about the\nfailure. \n\n##### Parameters\n\n| info | Response information. May be `null` if no response was received. |\n| exception | detailed information about the error that occurred. |\n|-----------|------------------------------------------------------------------|\n\n#### public abstract void\n**onSucceeded**\n([UrlResponseInfo](../../../../../reference/org/chromium/net/UrlResponseInfo.html) info, T body)\n\nInvoked when request is completed successfully. Once invoked, no other methods will be\ninvoked on this object. \n\n##### Parameters\n\n| info | Response information. |\n| body | The response body transformed to the desired type. |\n|------|----------------------------------------------------|"]]