|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface EventHandler
Callbacks in this interface are made as an HTTP request is processed. The normal order of callbacks is status(), headers(), then multiple data() then endData(). handleSslErrorRequest(), if there is an SSL certificate error. error() can occur anywhere in the transaction.
| Field Summary | |
|---|---|
static int |
ERROR
Generic error |
static int |
ERROR_AUTH
User authentication failed on server |
static int |
ERROR_BAD_URL
Bad URL |
static int |
ERROR_CONNECT
Could not connect to server |
static int |
ERROR_FAILED_SSL_HANDSHAKE
Failed to perform SSL handshake |
static int |
ERROR_IO
Failed to write to or read from server |
static int |
ERROR_LOOKUP
Server or proxy hostname lookup failed |
static int |
ERROR_PROXYAUTH
User authentication failed on proxy |
static int |
ERROR_REDIRECT_LOOP
Too many redirects |
static int |
ERROR_TIMEOUT
Connection timed out |
static int |
ERROR_UNSUPPORTED_AUTH_SCHEME
Unsupported authentication scheme (ie, not basic or digest) |
static int |
ERROR_UNSUPPORTED_SCHEME
Unsupported URI scheme (ie, not http, https, etc) |
static int[] |
errorStringResources
|
static int |
FILE_ERROR
Generic file error for file:/// loads |
static int |
FILE_NOT_FOUND_ERROR
File not found error for file:/// loads |
static int |
OK
Success |
static int |
TOO_MANY_REQUESTS_ERROR
Too many requests queued |
| Method Summary | |
|---|---|
void |
certificate(SslCertificate certificate)
SSL certificate callback called every time a resource is loaded via a secure connection |
void |
data(byte[] data,
int len)
An array containing all or part of the http body as read from the server. |
void |
endData()
Called when the document is completely read. |
void |
error(int id,
String description)
There was trouble. |
void |
handleSslErrorRequest(SslError error)
SSL certificate error callback. |
void |
headers(Headers headers)
Called after all headers are successfully processed. |
void |
status(int major_version,
int minor_version,
int code,
String reason_phrase)
Called after status line has been sucessfully processed. |
| Field Detail |
|---|
static final int OK
static final int ERROR
static final int ERROR_LOOKUP
static final int ERROR_UNSUPPORTED_AUTH_SCHEME
static final int ERROR_AUTH
static final int ERROR_PROXYAUTH
static final int ERROR_CONNECT
static final int ERROR_IO
static final int ERROR_TIMEOUT
static final int ERROR_REDIRECT_LOOP
static final int ERROR_UNSUPPORTED_SCHEME
static final int ERROR_FAILED_SSL_HANDSHAKE
static final int ERROR_BAD_URL
static final int FILE_ERROR
static final int FILE_NOT_FOUND_ERROR
static final int TOO_MANY_REQUESTS_ERROR
static final int[] errorStringResources
| Method Detail |
|---|
void status(int major_version,
int minor_version,
int code,
String reason_phrase)
major_version - HTTP version advertised by server. major
is the part before the "."minor_version - HTTP version advertised by server. minor
is the part after the "."code - HTTP Status code. See RFC 2616.reason_phrase - Textual explanation sent by servervoid headers(Headers headers)
void data(byte[] data,
int len)
data - A byte array containing the contentlen - The length of valid content in data
Note: chunked and compressed encodings are handled within
android.net.http. Decoded data is passed through this
interface.void endData()
void certificate(SslCertificate certificate)
void error(int id,
String description)
id - One of the error codes defined belowdescription - of errorvoid handleSslErrorRequest(SslError error)
|
Build 1.0_r1(from source) | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||