Known Direct Subclasses
TransferCompletionHandler |
A AsyncHandler that can be used to notify a set of TransferListener
AsyncHttpClient client = new AsyncHttpClient();
TransferCompletionHandler tl = new TransferCompletionHandler();
tl.addTransferListener(new TransferListener() {
public void onRequestHeadersSent(FluentCaseInsensitiveStringsMap headers) {
}
public void onResponseHeadersReceived(FluentCaseInsensitiveStringsMap headers) {
}
public void onBytesReceived(ByteBuffer buffer) {
}
public void onBytesSent(ByteBuffer buffer) {
}
public void onRequestResponseCompleted() {
}
public void onThrowable(Throwable t) {
}
});
Response response = httpClient.prepareGet("http://...").execute(tl).get();
|
|
Summary
Public Methods |
Response
|
onCompleted(Response response)
Invoked once the HTTP response processing is finished.
|
void
|
onThrowable(Throwable t)
Invoked when an unexpected exception occurs during the processing of the response.
|
Public Constructors
public
AsyncCompletionHandlerBase
()
Public Methods
Invoked once the HTTP response processing is finished.
Gets always invoked as last callback method.
Returns
- T Value that will be returned by the associated java.util.concurrent.Future
public
void
onThrowable
(Throwable t)
Invoked when an unexpected exception occurs during the processing of the response. The exception may have been
produced by implementation of onXXXReceived method invocation.