com.ning.http.client.providers.jdk
Class JDKAsyncHttpProvider
java.lang.Object
   com.ning.http.client.providers.jdk.JDKAsyncHttpProvider
com.ning.http.client.providers.jdk.JDKAsyncHttpProvider
- All Implemented Interfaces: 
- AsyncHttpProvider
- public class JDKAsyncHttpProvider 
- extends Object- implements AsyncHttpProvider
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
JDKAsyncHttpProvider
public JDKAsyncHttpProvider(AsyncHttpClientConfig config)
execute
public <T> ListenableFuture<T> execute(Request request,
                                       AsyncHandler<T> handler)
                            throws IOException
- Description copied from interface: AsyncHttpProvider
- Execute the request and invoke the AsyncHandlerwhen the response arrive.
 
- 
- Specified by:
- executein interface- AsyncHttpProvider
 
- 
- handler- an instance of- AsyncHandler
- Returns:
- a ListenableFutureof Type T.
- Throws:
- IOException
 
execute
public <T> ListenableFuture<T> execute(Request request,
                                       AsyncHandler<T> handler,
                                       ListenableFuture<?> future)
                            throws IOException
- 
 
- 
- Throws:
- IOException
 
close
public void close()
- Description copied from interface: AsyncHttpProvider
- Close the current underlying TCP/HTTP connection.
 
- 
- Specified by:
- closein interface- AsyncHttpProvider
 
- 
 
prepareResponse
public Response prepareResponse(HttpResponseStatus status,
                                HttpResponseHeaders headers,
                                Collection<HttpResponseBodyPart> bodyParts)
- Description copied from interface: AsyncHttpProvider
- Prepare a Response
 
- 
- Specified by:
- prepareResponsein interface- AsyncHttpProvider
 
- 
- Parameters:
- status-- HttpResponseStatus
- headers-- HttpResponseHeaders
- bodyParts- list of- HttpResponseBodyPart
- Returns:
- a Response
 
Copyright © 2011. All Rights Reserved.