|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface SimpleAHCTransferListener
A simple transfer listener for use with the 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)
| Method Summary | |
|---|---|
void |
onBytesReceived(java.lang.String url,
long amount,
long current,
long total)
This method is called when bytes of the responses body are received. |
void |
onBytesSent(java.lang.String url,
long amount,
long current,
long total)
This method is called when bytes are sent. |
void |
onCompleted(java.lang.String url,
int statusCode,
java.lang.String statusText)
This method is called when the request is completed. |
void |
onHeaders(java.lang.String url,
HeaderMap headers)
This method is called after the response headers are received. |
void |
onStatus(java.lang.String url,
int statusCode,
java.lang.String statusText)
This method is called after the connection status is received. |
| Method Detail |
|---|
void onStatus(java.lang.String url,
int statusCode,
java.lang.String statusText)
url - the url for the connection.statusCode - the received status code.statusText - the received status text.
void onHeaders(java.lang.String url,
HeaderMap headers)
url - the url for the connection.headers - the received headers, never null.
void onBytesReceived(java.lang.String url,
long amount,
long current,
long total)
url - the url for the connection.amount - 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(java.lang.String url,
long amount,
long current,
long total)
url - the url for the connection.amount - 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 onCompleted(java.lang.String url,
int statusCode,
java.lang.String statusText)
url - the url for the connection.statusCode - the received status code.statusText - the received status text.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||