public interface CefResourceHandler
限定符和类型 | 方法和说明 |
---|---|
void |
cancel()
Request processing has been canceled.
(请求处理已被取消。)
|
void |
getResponseHeaders(CefResponse response, IntRef responseLength, StringRef redirectUrl)
Retrieve response header information.
(检索响应头信息。)
|
boolean |
processRequest(CefRequest request, CefCallback callback)
Begin processing the request.
(开始处理请求。)
|
boolean |
readResponse(byte[] dataOut, int bytesToRead, IntRef bytesRead, CefCallback callback)
Read response data.
(读取响应数据。)
|
void cancel()
void getResponseHeaders(CefResponse response, IntRef responseLength, StringRef redirectUrl)
response
- The request response that should be returned. Instance only valid within the scope of this method.
(-应该返回的请求响应。实例仅在此方法的范围内有效。)
responseLength
- Optionally set the response length if known.
(-(可选)设置响应长度(如果已知)。)
redirectUrl
- Optionally redirect the request to a new URL.
(-(可选)将请求重定向到新的URL。)
boolean processRequest(CefRequest request, CefCallback callback)
request
- The request itself. Cannot be modified in this callback. Instance only valid within the scope of this method.
(-请求本身。无法在此回调中修改。实例仅在此方法的范围内有效。)
callback
- Callback to continue or cancel the request.
(-回调以继续或取消请求。)
boolean readResponse(byte[] dataOut, int bytesToRead, IntRef bytesRead, CefCallback callback)
dataOut
- Write data to this buffer.
(-将数据写入此缓冲区。)
bytesToRead
- Size of the buffer.
(-缓冲区的大小。)
bytesRead
- Number of bytes written to the buffer.
(-写入缓冲区的字节数。)
callback
- Callback to execute if data will be available asynchronously.
(-如果数据异步可用,则执行回调。)