public class

GrizzlyAsyncHttpProvider

extends Object
implements AsyncHttpProvider
java.lang.Object
   ↳ com.ning.http.client.providers.grizzly.GrizzlyAsyncHttpProvider

Class Overview

A Grizzly 2.0-based implementation of AsyncHttpProvider.

Summary

Public Constructors
GrizzlyAsyncHttpProvider(AsyncHttpClientConfig clientConfig)
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
<T> ListenableFuture<T> execute(Connection c, Request request, AsyncHandler<T> handler, GrizzlyResponseFuture<T> future)
void initializeTransport(AsyncHttpClientConfig clientConfig)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.ning.http.client.AsyncHttpProvider

Public Constructors

public GrizzlyAsyncHttpProvider (AsyncHttpClientConfig clientConfig)

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 ListenableFuture<T> execute (Connection c, Request request, AsyncHandler<T> handler, GrizzlyResponseFuture<T> future)

Throws
IOException

protected void initializeTransport (AsyncHttpClientConfig clientConfig)