Package | Description |
---|---|
org.asynchttpclient | |
org.asynchttpclient.handler |
Modifier and Type | Class and Description |
---|---|
class |
AsyncCompletionHandlerBase
Simple
AsyncHandler of type Response |
Modifier and Type | Class and Description |
---|---|
class |
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(HttpHeaders headers) { } public void onResponseHeadersReceived(HttpHeaders headers) { } public void onBytesReceived(ByteBuffer buffer) { } public void onBytesSent(long amount, long current, long total) { } public void onRequestResponseCompleted() { } public void onThrowable(Throwable t) { } }); Response response = httpClient.prepareGet("http://...").execute(tl).get(); |
Copyright © 2016. All Rights Reserved.