40 * <a href="https://tools.ietf.org/html/rfc7540">Hypertext Transfer Protocol |
40 * <a href="https://tools.ietf.org/html/rfc7540">Hypertext Transfer Protocol |
41 * Version 2 (HTTP/2)</a>, the <a href="https://tools.ietf.org/html/rfc2616"> |
41 * Version 2 (HTTP/2)</a>, the <a href="https://tools.ietf.org/html/rfc2616"> |
42 * Hypertext Transfer Protocol (HTTP/1.1)</a>, and |
42 * Hypertext Transfer Protocol (HTTP/1.1)</a>, and |
43 * <a href="https://tools.ietf.org/html/rfc6455">The WebSocket Protocol</a>. |
43 * <a href="https://tools.ietf.org/html/rfc6455">The WebSocket Protocol</a>. |
44 * |
44 * |
45 * <p> Asynchronous tasks and dependent actions of returned {@link |
45 * <p> In general, asynchronous tasks are executed either by the thread |
46 * java.util.concurrent.CompletableFuture} instances are executed on the threads |
46 * performing the send operation, or by the threads supplied by the client's |
47 * supplied by the client's {@link java.util.concurrent.Executor}, where |
47 * {@link java.net.http.HttpClient#executor() executor}. Dependent tasks, those |
48 * practical. |
48 * that are triggered by returned CompletionStages or CompletableFutures, that |
|
49 * do not explicitly specify an executor, are executed in the same |
|
50 * {@link java.util.concurrent.CompletableFuture#defaultExecutor() default |
|
51 * executor} as that of CompletableFuture, or the invoking thread if the send |
|
52 * operation completes before the dependent task is registered. |
49 * |
53 * |
50 * <p> {@code CompletableFuture}s returned by this API will throw {@link |
54 * <p> {@code CompletableFuture}s returned by this API will throw {@link |
51 * java.lang.UnsupportedOperationException} for their {@link |
55 * java.lang.UnsupportedOperationException} for their {@link |
52 * java.util.concurrent.CompletableFuture#obtrudeValue(Object) obtrudeValue} |
56 * java.util.concurrent.CompletableFuture#obtrudeValue(Object) obtrudeValue} |
53 * and {@link java.util.concurrent.CompletableFuture#obtrudeException(Throwable) |
57 * and {@link java.util.concurrent.CompletableFuture#obtrudeException(Throwable) |