public class

JDKAsyncHttpProvider

extends Object
implements AsyncHttpProvider
java.lang.Object
   ↳ com.ning.http.client.providers.jdk.JDKAsyncHttpProvider

Summary

Public Constructors
JDKAsyncHttpProvider(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.
<T> ListenableFuture<T> execute(Request request, AsyncHandler<T> handler, ListenableFuture<?> future)
Response prepareResponse(HttpResponseStatus status, HttpResponseHeaders headers, Collection<HttpResponseBodyPart> bodyParts)
Prepare a Response
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.ning.http.client.AsyncHttpProvider

Public Constructors

public JDKAsyncHttpProvider (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 ListenableFuture<T> execute (Request request, AsyncHandler<T> handler, ListenableFuture<?> future)

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