src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/MultiMapResult.java
branchhttp-client-branch
changeset 55780 d4b5b95da972
parent 55763 634d8e14c172
child 55818 725576a6821e
equal deleted inserted replaced
55777:e62cbcc08cae 55780:d4b5b95da972
    33 /**
    33 /**
    34  * A {@link java.util.Map} containing the result of a HTTP/2 request and multi-response.
    34  * A {@link java.util.Map} containing the result of a HTTP/2 request and multi-response.
    35  * {@Incubating}
    35  * {@Incubating}
    36  * <p>
    36  * <p>
    37  * This is one possible implementation of the aggregate result type {@code <U>} returned
    37  * This is one possible implementation of the aggregate result type {@code <U>} returned
    38  * from {@link HttpClient#sendAsync(HttpRequest,MultiProcessor) }.
    38  * from {@link HttpClient#sendAsync(HttpRequest,HttpResponse.MultiSubscriber) }.
    39  * The map is indexed by {@link HttpRequest} and each value is a
    39  * The map is indexed by {@link HttpRequest} and each value is a
    40  * {@link java.util.concurrent.CompletableFuture}&lt;
    40  * {@link java.util.concurrent.CompletableFuture}&lt;
    41  * {@link HttpResponse}{@code <V>}&gt;
    41  * {@link HttpResponse}{@code <V>}&gt;
    42  * <p>
    42  * <p>
    43  * A {@code MultiMapResult} is obtained from an invocation such as the one shown below:
    43  * A {@code MultiMapResult} is obtained from an invocation such as the one shown below:
    44  * <p>
    44  * <p>
    45  * {@link CompletableFuture}&lt;{@code MultiMapResult<V>}&gt;
    45  * {@link CompletableFuture}&lt;{@code MultiMapResult<V>}&gt;
    46  * {@link HttpClient#sendAsync(HttpRequest,
    46  * {@link HttpClient#sendAsync(HttpRequest,
    47  * HttpResponse.MultiSubscriber) HttpClient.sendAsync(}{@link
    47  * HttpResponse.MultiSubscriber) HttpClient.sendAsync(}{@link
    48  * HttpResponse.MultiSubscriber#asMap(java.util.function.Function)
    48  * HttpResponse.MultiSubscriber#asMap(java.util.function.Function)
    49  * MultiProcessor.asMap(Function)})
    49  * MultiSubscriber.asMap(Function)})
    50  *
    50  *
    51  * @param <V> the response body type for all responses
    51  * @param <V> the response body type for all responses
    52  */
    52  */
    53 public class MultiMapResult<V> implements Map<HttpRequest,CompletableFuture<HttpResponse<V>>> {
    53 public class MultiMapResult<V> implements Map<HttpRequest,CompletableFuture<HttpResponse<V>>> {
    54     private final Map<HttpRequest,CompletableFuture<HttpResponse<V>>> map;
    54     private final Map<HttpRequest,CompletableFuture<HttpResponse<V>>> map;