public interface CefResourceHandler
| Modifier and Type | Method and Description |
|---|---|
void |
cancel()
Request processing has been canceled.
|
void |
getResponseHeaders(CefResponse response,
IntRef responseLength,
StringRef redirectUrl)
Retrieve response header information.
|
boolean |
open(CefRequest request,
BoolRef handleRequest,
CefCallback callback)
Open the response stream.
|
boolean |
read(byte[] dataOut,
int bytesToRead,
IntRef bytesRead,
CefResourceReadCallback callback)
Read response data.
|
boolean |
skip(long bytesToSkip,
LongRef bytesSkipped,
CefResourceSkipCallback callback)
Skip response data when requested by a Range header.
|
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.boolean open(CefRequest request, BoolRef handleRequest, CefCallback callback)
For backwards compatibility set |handleRequest| to false and return false and the processRequest() method will be called.
request - The request itself. Cannot be modified in this callback. Instance only valid
within the scope of this method.handleRequest - Set to true to handle/cancel the request immediatelycallback - Callback to continue or cancel the request at a later timeboolean read(byte[] dataOut,
int bytesToRead,
IntRef bytesRead,
CefResourceReadCallback callback)
For backwards compatibility set |bytesRead| to -1 and return false and the readResponse() method will be called.
dataOut - Write data to this buffer. Buffer remains valid until either an immediate
response is delivered (return true) or the callback is called later when data is
available (return false).bytesToRead - Size of the buffer.bytesRead - Number of bytes written to the buffer.callback - Callback to execute if data will be available asynchronously.boolean skip(long bytesToSkip,
LongRef bytesSkipped,
CefResourceSkipCallback callback)
bytesToSkip - Number of bytes to skip.bytesSkipped - Number of bytes skipped.callback - Callback to execute if data will be skipped asynchronously.