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
 void onBytesReceived(ByteBuffer buffer)
          Invoked every time response's chunk are received.
 void onBytesSent(ByteBuffer buffer)
          Invoked every time request's chunk are sent.
 void onRequestHeadersSent(FluentCaseInsensitiveStringsMap headers)
          Invoked when the request bytes are starting to get send.
 void onRequestResponseCompleted()
          Invoked when the response bytes are been fully received.
 void onResponseHeadersReceived(FluentCaseInsensitiveStringsMap headers)
          Invoked when the response bytes are starting to get received.
 void onThrowable(Throwable t)
          Invoked when there is an unexpected issue.
 

Method Detail

onRequestHeadersSent

void onRequestHeadersSent(FluentCaseInsensitiveStringsMap headers)
Invoked when the request bytes are starting to get send.


onResponseHeadersReceived

void onResponseHeadersReceived(FluentCaseInsensitiveStringsMap headers)
Invoked when the response bytes are starting to get received.


onBytesReceived

void onBytesReceived(ByteBuffer buffer)
                     throws IOException
Invoked every time response's chunk are received.

Parameters:
buffer - a ByteBuffer
Throws:
IOException

onBytesSent

void onBytesSent(ByteBuffer buffer)
Invoked every time request's chunk are sent.

Parameters:
buffer - a ByteBuffer

onRequestResponseCompleted

void onRequestResponseCompleted()
Invoked when the response bytes are been fully received.


onThrowable

void onThrowable(Throwable t)
Invoked when there is an unexpected issue.

Parameters:
t - a Throwable


Copyright © 2011. All Rights Reserved.