HTTP异步客户端HttpAsyncClient

  • 接口
/**
 * 此接口只代表HTTP请求执行的最基本的契约。它对请求执行过程不施
 * 加任何限制或特定细节,并将状态管理、身份验证和重定向处理的细节
 * 留给子类实现。
 */
public interface HttpAsyncClient {

    /**
     * 使用给定上下文启动异步HTTP请求execution。
     */
     Future execute(
            HttpAsyncRequestProducer requestProducer,
            HttpAsyncResponseConsumer responseConsumer,
            HttpContext context,
            FutureCallback callback);

    /**
     * 使用默认上下文启动异步HTTP请求execution
     */
     Future execute(
            HttpAsyncRequestProducer requestProducer,
            HttpAsyncResponseConsumer responseConsumer,
            FutureCallback callback);

    /**
     * 启动给定目标的异步HTTP请求execution(指定上线文)
     */
    Future execute(
            HttpHost target, HttpRequest request, HttpContext context,
            FutureCallback callback);

    /**
     * 启动给定目标的异步HTTP请求execution
     */
    Future execute(
            HttpHost target, HttpRequest request,
            FutureCallback callback);

    /**
     * 使用给定上下文启动异步HTTP请求execution
     */
    Future execute(
            HttpUriRequest request, HttpContext context,
            FutureCallback callback);

    /**
     * 启动异步HTTP请求execution
     */
    Future execute(
            HttpUriRequest request,
            FutureCallback callback);

}

  • ** 实现类 **


    HTTP异步客户端HttpAsyncClient_第1张图片
    MinimalHttpAsyncClient继承关系图.png
HTTP异步客户端HttpAsyncClient_第2张图片
MinimalHttpAsyncClient继承关系图.png

你可能感兴趣的:(HTTP异步客户端HttpAsyncClient)