Package org.asynchttpclient.handler
Interface TransferListener
-
public interface TransferListenerA simple interface an application can implement in order to received byte transfer information.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonBytesReceived(byte[] bytes)Invoked every time response's chunk are received.voidonBytesSent(long amount, long current, long total)Invoked every time request's chunk are sent.voidonRequestHeadersSent(io.netty.handler.codec.http.HttpHeaders headers)Invoked when the request bytes are starting to get send.voidonRequestResponseCompleted()Invoked when the response bytes are been fully received.voidonResponseHeadersReceived(io.netty.handler.codec.http.HttpHeaders headers)Invoked when the response bytes are starting to get received.voidonThrowable(Throwable t)Invoked when there is an unexpected issue.
-
-
-
Method Detail
-
onRequestHeadersSent
void onRequestHeadersSent(io.netty.handler.codec.http.HttpHeaders headers)
Invoked when the request bytes are starting to get send.- Parameters:
headers- the headers
-
onResponseHeadersReceived
void onResponseHeadersReceived(io.netty.handler.codec.http.HttpHeaders headers)
Invoked when the response bytes are starting to get received.- Parameters:
headers- the headers
-
onBytesReceived
void onBytesReceived(byte[] bytes)
Invoked every time response's chunk are received.- Parameters:
bytes- abytearray
-
onBytesSent
void onBytesSent(long amount, long current, long total)Invoked every time request's chunk are sent.- Parameters:
amount- The amount of bytes to transfercurrent- The amount of bytes transferredtotal- The total number of bytes transferred
-
onRequestResponseCompleted
void onRequestResponseCompleted()
Invoked when the response bytes are been fully received.
-
-