public interface SimpleAHCTransferListener
SimpleAsyncHttpClient
.
Note: This listener does not cover requests failing before a connection is
established. For error handling, see
SimpleAsyncHttpClient.Builder.setDefaultThrowableHandler(com.ning.http.client.ThrowableHandler)
Modifier and Type | Method and Description |
---|---|
void |
onBytesReceived(Uri uri,
long amount,
long current,
long total)
This method is called when bytes of the responses body are received.
|
void |
onBytesSent(Uri uri,
long amount,
long current,
long total)
This method is called when bytes are sent.
|
void |
onCompleted(Uri uri,
int statusCode,
String statusText)
This method is called when the request is completed.
|
void |
onHeaders(Uri uri,
HeaderMap headers)
This method is called after the response headers are received.
|
void |
onStatus(Uri uri,
int statusCode,
String statusText)
This method is called after the connection status is received.
|
void onStatus(Uri uri, int statusCode, String statusText)
url
- the url for the connection.statusCode
- the received status code.statusText
- the received status text.void onHeaders(Uri uri, HeaderMap headers)
uri
- the uriheaders
- the received headers, never null
.void onBytesReceived(Uri uri, long amount, long current, long total)
uri
- the uriamount
- the number of transferred bytes so far.current
- the number of transferred bytes since the last call to this
method.total
- the total number of bytes to be transferred. This is taken
from the Content-Length-header and may be unspecified (-1).void onBytesSent(Uri uri, long amount, long current, long total)
uri
- the uriamount
- the number of transferred bytes so far.current
- the number of transferred bytes since the last call to this
method.total
- the total number of bytes to be transferred. This is taken
from the Content-Length-header and may be unspecified (-1).Copyright © 2015. All Rights Reserved.