Package com.ning.http.client.listener
Interface TransferListener
public interface TransferListener
A simple interface an application can implements in order to received byte transfer information.
-
Method Summary
Modifier and TypeMethodDescriptionvoidonBytesReceived(byte[] b) Invoked every time response's chunk are received.voidonBytesSent(long amount, long current, long total) Invoked every time request's chunk are sent.voidInvoked when the request bytes are starting to get send.voidInvoked when the response bytes are been fully received.voidInvoked when the response bytes are starting to get received.voidInvoked when there is an unexpected issue.
-
Method Details
-
onRequestHeadersSent
Invoked when the request bytes are starting to get send. -
onResponseHeadersReceived
Invoked when the response bytes are starting to get received. -
onBytesReceived
Invoked every time response's chunk are received.- Parameters:
b- bytes- Throws:
IOException
-
onBytesSent
void onBytesSent(long amount, long current, long total) Invoked every time request's chunk are sent.- Parameters:
amount-current-total-
-
onRequestResponseCompleted
void onRequestResponseCompleted()Invoked when the response bytes are been fully received. -
onThrowable
Invoked when there is an unexpected issue.- Parameters:
t- aThrowable
-