| java.lang.Object | ||
| ↳ | XWalkResourceClientInternal | |
| ↳ | org.xwalk.core.XWalkResourceClient | |
This class notifies the embedder resource events/callbacks.
| Constants | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| int | ERROR_AUTHENTICATION | User authentication failed on server | |||||||||
| int | ERROR_BAD_URL | Malformed URL | |||||||||
| int | ERROR_CONNECT | Failed to connect to the server | |||||||||
| int | ERROR_FAILED_SSL_HANDSHAKE | Failed to perform SSL handshake | |||||||||
| int | ERROR_FILE | Generic file error | |||||||||
| int | ERROR_FILE_NOT_FOUND | File not found | |||||||||
| int | ERROR_HOST_LOOKUP | Server or proxy hostname lookup failed | |||||||||
| int | ERROR_IO | Failed to read or write to the server | |||||||||
| int | ERROR_OK | Success | |||||||||
| int | ERROR_PROXY_AUTHENTICATION | User authentication failed on proxy | |||||||||
| int | ERROR_REDIRECT_LOOP | Too many redirects | |||||||||
| int | ERROR_TIMEOUT | Connection timed out | |||||||||
| int | ERROR_TOO_MANY_REQUESTS | Too many requests during this load | |||||||||
| int | ERROR_UNKNOWN | Generic error | |||||||||
| int | ERROR_UNSUPPORTED_AUTH_SCHEME | Unsupported authentication scheme (not basic or digest) | |||||||||
| int | ERROR_UNSUPPORTED_SCHEME | Unsupported URI scheme | |||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
|
XWalkResourceClient(XWalkView view)
Constructor.
| |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| void |
onLoadFinished(XWalkView view, String url)
Notify the client that the XWalkView completes to load the resource
specified by the given url.
| ||||||||||
| void |
onLoadStarted(XWalkView view, String url)
Notify the client that the XWalkView will load the resource specified
by the given url.
| ||||||||||
| void |
onProgressChanged(XWalkView view, int progressInPercent)
Notify the client the progress info of loading a specific url.
| ||||||||||
| void |
onReceivedLoadError(XWalkView view, int errorCode, String description, String failingUrl)
Report an error to the client.
| ||||||||||
| WebResourceResponse |
shouldInterceptLoadRequest(XWalkView view, String url)
Notify the client of a resource request and allow the client to return
the data.
| ||||||||||
| boolean |
shouldOverrideUrlLoading(XWalkView view, String url)
Give the host application a chance to take over the control when a new
url is about to be loaded in the current XWalkView.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
User authentication failed on server
Malformed URL
Failed to connect to the server
Failed to perform SSL handshake
Generic file error
File not found
Server or proxy hostname lookup failed
Failed to read or write to the server
Success
User authentication failed on proxy
Too many redirects
Connection timed out
Too many requests during this load
Generic error
Unsupported authentication scheme (not basic or digest)
Unsupported URI scheme
Constructor.
| view | the owner XWalkView instance. |
|---|
Notify the client that the XWalkView completes to load the resource specified by the given url.
| view | the owner XWalkView instance. |
|---|---|
| url | the url for the resource done for loading. |
Notify the client that the XWalkView will load the resource specified by the given url.
| view | the owner XWalkView instance. |
|---|---|
| url | the url for the resource to be loaded. |
Notify the client the progress info of loading a specific url.
| view | the owner XWalkView instance. |
|---|---|
| progressInPercent | the loading process in percent. |
Report an error to the client.
| view | the owner XWalkView instance. |
|---|---|
| errorCode | the error id. |
| description | A String describing the error. |
| failingUrl | The url that failed to load. |
Notify the client of a resource request and allow the client to return the data. If the return value is null, the XWalkView will continue to load the resource as usual. Otherwise, the return response and data will be used. NOTE: This method is called by the network thread so clients should exercise caution when accessing private data.
| view | The XWalkView that is requesting the
resource. |
|---|---|
| url | The raw url of the resource. |
Give the host application a chance to take over the control when a new url is about to be loaded in the current XWalkView. If XWalkClient is not provided, by default XWalkView will ask Activity Manager to choose the proper handler for the url. If XWalkClient is provided, return true means the host application handles the url, while return false means the current XWalkView handles the url.
| view | The XWalkView that is initiating the callback. |
|---|---|
| url | The url to be loaded. |