|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectandroid.os.Handler
android.webkit.LoadListener
class LoadListener
| Field Summary | |
|---|---|
long |
mContentLength
|
| Fields inherited from interface android.net.http.EventHandler |
|---|
ERROR, ERROR_AUTH, ERROR_BAD_URL, ERROR_CONNECT, ERROR_FAILED_SSL_HANDSHAKE, ERROR_IO, ERROR_LOOKUP, ERROR_PROXYAUTH, ERROR_REDIRECT_LOOP, ERROR_TIMEOUT, ERROR_UNSUPPORTED_AUTH_SCHEME, ERROR_UNSUPPORTED_SCHEME, errorStringResources, FILE_ERROR, FILE_NOT_FOUND_ERROR, OK, TOO_MANY_REQUESTS_ERROR |
| Constructor Summary | |
|---|---|
LoadListener(Context context,
BrowserFrame frame,
String url,
int nativeLoader,
boolean synchronous,
boolean isMainPageLoader)
|
|
| Method Summary | |
|---|---|
(package private) void |
attachRequestHandle(RequestHandle requestHandle)
|
(package private) boolean |
authCredentialsInvalid()
Returns true iff an HTTP authentication problem has occured (credentials invalid). |
void |
cancel()
Cancel a request. |
boolean |
cancelled()
|
void |
certificate(SslCertificate certificate)
Implementation of certificate handler for EventHandler. |
(package private) boolean |
checkCache(Map<String,String> headers)
Check the cache for the current URL, and load it if it is valid. |
(package private) long |
contentLength()
|
void |
data(byte[] data,
int length)
Add data to the internal collection of data. |
(package private) void |
detachRequestHandle()
|
(package private) void |
downloadFile()
|
void |
endData()
Event handler's endData call. |
void |
error(int id,
String description)
Implementation of error handler for EventHandler. |
(package private) Context |
getContext()
|
(package private) BrowserFrame |
getFrame()
|
static LoadListener |
getLoadListener(Context context,
BrowserFrame frame,
String url,
int nativeLoader,
boolean synchronous,
boolean isMainPageLoader)
|
static int |
getNativeLoaderCount()
|
(package private) WebAddress |
getWebAddress()
|
(package private) void |
handleAuthResponse(String username,
String password)
Uses user-supplied credentials to restar a request. |
void |
handleMessage(Message msg)
Subclasses must implement this to receive messages. |
void |
handleSslErrorRequest(SslError error)
SSL certificate error callback. |
(package private) void |
handleSslErrorResponse(boolean proceed)
Handles SSL error(s) on the way down from the user (the user has already provided their feedback). |
void |
headers(Headers headers)
Parse the headers sent from the server. |
(package private) String |
host()
|
(package private) boolean |
isSynchronous()
|
(package private) void |
loadSynchronousMessages()
Cycle through our messages for synchronous loads. |
(package private) String |
mimeType()
|
(package private) void |
notifyError()
Notify the loader we encountered an error. |
(package private) String |
originalUrl()
|
(package private) boolean |
proxyAuthenticate()
|
(package private) String |
realm()
|
(package private) void |
resetCancel()
|
(package private) void |
setCacheLoader(CacheLoader result)
Set the CacheLoader for the case where we might want to load from cache |
(package private) void |
setRequestData(String method,
Map<String,String> headers,
String postData,
boolean isHighPriority)
This is called when a request can be satisfied by the cache, however, the cache result could be a redirect. |
(package private) void |
setUrl(String url)
Sets the current URL associated with this load. |
(package private) SslError |
sslError()
|
void |
status(int majorVersion,
int minorVersion,
int code,
String reasonPhrase)
Report the status of the response. |
(package private) void |
tearDown()
Tear down the load. |
(package private) String |
url()
|
(package private) static boolean |
willLoadFromCache(String url)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public long mContentLength
| Constructor Detail |
|---|
LoadListener(Context context,
BrowserFrame frame,
String url,
int nativeLoader,
boolean synchronous,
boolean isMainPageLoader)
| Method Detail |
|---|
public static LoadListener getLoadListener(Context context,
BrowserFrame frame,
String url,
int nativeLoader,
boolean synchronous,
boolean isMainPageLoader)
public static int getNativeLoaderCount()
public void handleMessage(Message msg)
Handler
handleMessage in class HandlerBrowserFrame getFrame()
Context getContext()
boolean isSynchronous()
public boolean cancelled()
public void headers(Headers headers)
headers in interface EventHandlerheaders - gives up the HeaderGroup
IMPORTANT: as this is called from network thread, can't call native
directlyboolean proxyAuthenticate()
public void status(int majorVersion,
int minorVersion,
int code,
String reasonPhrase)
status in interface EventHandlermajorVersion - HTTP version advertised by server. major
is the part before the "."minorVersion - HTTP version advertised by server. minor
is the part after the "."code - HTTP Status code. See RFC 2616.reasonPhrase - Textual explanation sent by serverpublic void certificate(SslCertificate certificate)
certificate in interface EventHandlercertificate - The SSL certifcate
public void error(int id,
String description)
error in interface EventHandlerid - The error id described by EventHandler.description - A string description of the error.
IMPORTANT: as this is called from network thread, can't call native
directly
public void data(byte[] data,
int length)
data in interface EventHandlerdata - A byte array containing the content.length - The length of data.
IMPORTANT: as this is called from network thread, can't call native
directlypublic void endData()
endData in interface EventHandlerboolean checkCache(Map<String,String> headers)
headers - for the request
public void handleSslErrorRequest(SslError error)
handleSslErrorRequest in interface EventHandlerString realm()
boolean authCredentialsInvalid()
SslError sslError()
void handleSslErrorResponse(boolean proceed)
void handleAuthResponse(String username,
String password)
void setCacheLoader(CacheLoader result)
result -
void setRequestData(String method,
Map<String,String> headers,
String postData,
boolean isHighPriority)
method - headers - postData - isHighPriority - String url()
WebAddress getWebAddress()
String host()
String originalUrl()
void attachRequestHandle(RequestHandle requestHandle)
void detachRequestHandle()
void downloadFile()
static boolean willLoadFromCache(String url)
void resetCancel()
String mimeType()
long contentLength()
void tearDown()
void notifyError()
public void cancel()
void setUrl(String url)
void loadSynchronousMessages()
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||