public class

ApacheAsyncHttpProvider

extends Object
implements AsyncHttpProvider
java.lang.Object
   ↳ com.ning.http.client.providers.apache.ApacheAsyncHttpProvider

Class Overview

An AsyncHttpProvider for Apache Http Client 3.1

Summary

Nested Classes
class ApacheAsyncHttpProvider.ApacheClientRunnable<T>  
class ApacheAsyncHttpProvider.EntityWriterRequestEntity  
Public Constructors
ApacheAsyncHttpProvider(AsyncHttpClientConfig config)
Public Methods
void close()
Close the current underlying TCP/HTTP connection.
<T> ListenableFuture<T> execute(Request request, AsyncHandler<T> handler)
Execute the request and invoke the AsyncHandler when the response arrive.
Response prepareResponse(HttpResponseStatus status, HttpResponseHeaders headers, Collection<HttpResponseBodyPart> bodyParts)
Prepare a Response
Protected Methods
static int requestTimeout(AsyncHttpClientConfig config, PerRequestConfig perRequestConfig)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.ning.http.client.AsyncHttpProvider

Public Constructors

public ApacheAsyncHttpProvider (AsyncHttpClientConfig config)

Public Methods

public void close ()

Close the current underlying TCP/HTTP connection.

public ListenableFuture<T> execute (Request request, AsyncHandler<T> handler)

Execute the request and invoke the AsyncHandler when the response arrive.

Parameters
handler an instance of AsyncHandler
Returns
Throws
IOException

public Response prepareResponse (HttpResponseStatus status, HttpResponseHeaders headers, Collection<HttpResponseBodyPart> bodyParts)

Prepare a Response

Parameters
status HttpResponseStatus
headers HttpResponseHeaders
bodyParts list of HttpResponseBodyPart
Returns

Protected Methods

protected static int requestTimeout (AsyncHttpClientConfig config, PerRequestConfig perRequestConfig)