aboutsummaryrefslogtreecommitdiffstats
path: root/clustercontroller-utils/src/test/java/com/yahoo/vespa/clustercontroller/utils/test/AsyncHttpClient.java
blob: 1c12414785f32e9bd12dc5462567587d848c10f6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.clustercontroller.utils.test;

import com.yahoo.vespa.clustercontroller.utils.communication.async.AsyncOperation;
import com.yahoo.vespa.clustercontroller.utils.communication.http.HttpRequest;
import com.yahoo.vespa.clustercontroller.utils.communication.http.HttpResult;

/**
 * Abstraction of an asynchronous HTTP client, such that applications don't need to depend directly on an HTTP client.
 */
public interface AsyncHttpClient<V extends HttpResult> {

    AsyncOperation<V> execute(HttpRequest r);

    /** Attempt to cancel all pending operations and shut down the client. */
    void close();

}