Stay organized with collections
Save and categorize content based on your preferences.
UrlRequest.StatusListener
public
static
interface
UrlRequest.StatusListener
android.net.http.UrlRequest.StatusListener
|
Listener interface used with UrlRequest.getStatus(StatusListener)
to receive the status of a
UrlRequest
.
Summary
Public methods
onStatus
public abstract void onStatus (int status)
Invoked on UrlRequest
's Executor
's thread when request status is
obtained.
Parameters |
status |
int : integer representing the status of the request. It is one of the values
defined
in Status .
Value is UrlRequest.Status.INVALID , UrlRequest.Status.IDLE , UrlRequest.Status.WAITING_FOR_STALLED_SOCKET_POOL , UrlRequest.Status.WAITING_FOR_AVAILABLE_SOCKET , UrlRequest.Status.WAITING_FOR_DELEGATE , UrlRequest.Status.WAITING_FOR_CACHE , UrlRequest.Status.DOWNLOADING_PAC_FILE , UrlRequest.Status.RESOLVING_PROXY_FOR_URL , UrlRequest.Status.RESOLVING_PROXY_FOR_URL , UrlRequest.Status.RESOLVING_HOST_IN_PAC_FILE , UrlRequest.Status.ESTABLISHING_PROXY_TUNNEL , UrlRequest.Status.RESOLVING_HOST , UrlRequest.Status.CONNECTING , UrlRequest.Status.SSL_HANDSHAKE , UrlRequest.Status.SENDING_REQUEST , UrlRequest.Status.WAITING_FOR_RESPONSE , or UrlRequest.Status.READING_RESPONSE |
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 2025-02-10 UTC.
[null,null,["Last updated 2025-02-10 UTC."],[],[],null,["# UrlRequest.StatusListener\n\nAdded in [API level 34](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nAlso in [S Extensions 7](/sdkExtensions) \n\nUrlRequest.StatusListener\n=========================\n\n*** ** * ** ***\n\n[Kotlin](/reference/kotlin/android/net/http/UrlRequest.StatusListener \"View this page in Kotlin\") \\|Java\n\n\n`\npublic\nstatic\n\n\ninterface\nUrlRequest.StatusListener\n`\n\n\n`\n\n\n`\n\n|--------------------------------------------|\n| android.net.http.UrlRequest.StatusListener |\n\n\u003cbr /\u003e\n\n*** ** * ** ***\n\nListener interface used with [UrlRequest.getStatus(StatusListener)](/reference/android/net/http/UrlRequest#getStatus(android.net.http.UrlRequest.StatusListener)) to receive the status of a\n[UrlRequest](/reference/android/net/http/UrlRequest).\n\nSummary\n-------\n\n| ### Public methods ||\n|------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| ` abstract void` | ` `[onStatus](/reference/android/net/http/UrlRequest.StatusListener#onStatus(int))`(int status) ` Invoked on [UrlRequest](/reference/android/net/http/UrlRequest)'s [Executor](/reference/java/util/concurrent/Executor)'s thread when request status is obtained. |\n\nPublic methods\n--------------\n\n### onStatus\n\nAdded in [API level 34](/guide/topics/manifest/uses-sdk-element#ApiLevels) \nAlso in [S Extensions 7](/sdkExtensions) \n\n```\npublic abstract void onStatus (int status)\n```\n\nInvoked on [UrlRequest](/reference/android/net/http/UrlRequest)'s [Executor](/reference/java/util/concurrent/Executor)'s thread when request status is\nobtained.\n\n\u003cbr /\u003e\n\n| Parameters ||\n|----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `status` | `int`: integer representing the status of the request. It is one of the values defined in [Status](/reference/android/net/http/UrlRequest.Status). Value is [UrlRequest.Status.INVALID](/reference/android/net/http/UrlRequest.Status#INVALID), [UrlRequest.Status.IDLE](/reference/android/net/http/UrlRequest.Status#IDLE), [UrlRequest.Status.WAITING_FOR_STALLED_SOCKET_POOL](/reference/android/net/http/UrlRequest.Status#WAITING_FOR_STALLED_SOCKET_POOL), [UrlRequest.Status.WAITING_FOR_AVAILABLE_SOCKET](/reference/android/net/http/UrlRequest.Status#WAITING_FOR_AVAILABLE_SOCKET), [UrlRequest.Status.WAITING_FOR_DELEGATE](/reference/android/net/http/UrlRequest.Status#WAITING_FOR_DELEGATE), [UrlRequest.Status.WAITING_FOR_CACHE](/reference/android/net/http/UrlRequest.Status#WAITING_FOR_CACHE), [UrlRequest.Status.DOWNLOADING_PAC_FILE](/reference/android/net/http/UrlRequest.Status#DOWNLOADING_PAC_FILE), [UrlRequest.Status.RESOLVING_PROXY_FOR_URL](/reference/android/net/http/UrlRequest.Status#RESOLVING_PROXY_FOR_URL), [UrlRequest.Status.RESOLVING_PROXY_FOR_URL](/reference/android/net/http/UrlRequest.Status#RESOLVING_PROXY_FOR_URL), [UrlRequest.Status.RESOLVING_HOST_IN_PAC_FILE](/reference/android/net/http/UrlRequest.Status#RESOLVING_HOST_IN_PAC_FILE), [UrlRequest.Status.ESTABLISHING_PROXY_TUNNEL](/reference/android/net/http/UrlRequest.Status#ESTABLISHING_PROXY_TUNNEL), [UrlRequest.Status.RESOLVING_HOST](/reference/android/net/http/UrlRequest.Status#RESOLVING_HOST), [UrlRequest.Status.CONNECTING](/reference/android/net/http/UrlRequest.Status#CONNECTING), [UrlRequest.Status.SSL_HANDSHAKE](/reference/android/net/http/UrlRequest.Status#SSL_HANDSHAKE), [UrlRequest.Status.SENDING_REQUEST](/reference/android/net/http/UrlRequest.Status#SENDING_REQUEST), [UrlRequest.Status.WAITING_FOR_RESPONSE](/reference/android/net/http/UrlRequest.Status#WAITING_FOR_RESPONSE), or [UrlRequest.Status.READING_RESPONSE](/reference/android/net/http/UrlRequest.Status#READING_RESPONSE) \u003cbr /\u003e |"]]