|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ning.http.client.providers.jdk.JDKAsyncHttpProvider
public class JDKAsyncHttpProvider
Constructor Summary | |
---|---|
JDKAsyncHttpProvider(AsyncHttpClientConfig config)
|
Method Summary | ||
---|---|---|
void |
close()
Close the current underlying TCP/HTTP connection.s |
|
|
execute(Request request,
AsyncHandler<T> handler)
Execute the request and invoke the AsyncHandler when the response arrive. |
|
Response |
prepareResponse(HttpResponseStatus status,
HttpResponseHeaders headers,
java.util.Collection<HttpResponseBodyPart> bodyParts)
Prepare a Response |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JDKAsyncHttpProvider(AsyncHttpClientConfig config)
Method Detail |
---|
public <T> java.util.concurrent.Future<T> execute(Request request, AsyncHandler<T> handler) throws java.io.IOException
AsyncHttpProvider
AsyncHandler
when the response arrive.
execute
in interface AsyncHttpProvider<java.net.HttpURLConnection>
handler
- an instance of AsyncHandler
Future
of Type T.
java.io.IOException
public void close()
AsyncHttpProvider
close
in interface AsyncHttpProvider<java.net.HttpURLConnection>
public Response prepareResponse(HttpResponseStatus status, HttpResponseHeaders headers, java.util.Collection<HttpResponseBodyPart> bodyParts)
AsyncHttpProvider
Response
prepareResponse
in interface AsyncHttpProvider<java.net.HttpURLConnection>
status
- HttpResponseStatus
headers
- HttpResponseHeaders
bodyParts
- list of HttpResponseBodyPart
Response
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |