Package com.ning.http.client
Interface AsyncHttpProvider
- All Known Implementing Classes:
GrizzlyAsyncHttpProvider
public interface AsyncHttpProvider
Interface to be used when implementing custom asynchronous I/O HTTP client.
By default, the
GrizzlyAsyncHttpProvider is used.-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the current underlying TCP/HTTP connection.<T> ListenableFuture<T>execute(Request request, AsyncHandler<T> handler) Execute the request and invoke theAsyncHandlerwhen the response arrive.
-
Method Details
-
execute
Execute the request and invoke theAsyncHandlerwhen the response arrive.- Parameters:
handler- an instance ofAsyncHandler- Returns:
- a
ListenableFutureof Type T.
-
close
void close()Close the current underlying TCP/HTTP connection.
-