34 * <li>{@link java.net.http.HttpRequest}</li> |
34 * <li>{@link java.net.http.HttpRequest}</li> |
35 * <li>{@link java.net.http.HttpResponse}</li> |
35 * <li>{@link java.net.http.HttpResponse}</li> |
36 * <li>{@link java.net.http.WebSocket}</li> |
36 * <li>{@link java.net.http.WebSocket}</li> |
37 * </ul> |
37 * </ul> |
38 * |
38 * |
39 * <p> The API functions asynchronously (using {@link java.util.concurrent.CompletableFuture}) |
39 * <p> Asynchronous tasks and dependent actions of returned {@link |
40 * and work is done on the threads supplied by the client's {@link java.util.concurrent.Executor} |
40 * java.util.concurrent.CompletableFuture} instances are executed on the threads |
41 * where practical. |
41 * supplied by the client's {@link java.util.concurrent.Executor}, where |
|
42 * practical. |
42 * |
43 * |
43 * <p> {@code HttpClient} also provides a simple synchronous mode, where all |
44 * <p> {@code CompletableFuture}s returned by this API will throw {@link |
44 * work may be done on the calling thread. |
45 * java.lang.UnsupportedOperationException} for their {@link |
45 * |
46 * java.util.concurrent.CompletableFuture#obtrudeValue(Object) obtrudeValue} |
46 * <p> {@code CompletableFuture}s returned by this API will throw {@link java.lang.UnsupportedOperationException} |
47 * and {@link java.util.concurrent.CompletableFuture#obtrudeException(Throwable) |
47 * for their {@link java.util.concurrent.CompletableFuture#obtrudeValue(Object) obtrudeValue} |
48 * obtrudeException} methods. Invoking the {@link |
48 * and {@link java.util.concurrent.CompletableFuture#obtrudeException(Throwable) obtrudeException} |
49 * java.util.concurrent.CompletableFuture#cancel cancel} method on a {@code |
49 * methods. Invoking the {@link java.util.concurrent.CompletableFuture#cancel cancel} |
50 * CompletableFuture} returned by this API will not interrupt the underlying |
50 * method on a {@code CompletableFuture} returned by this API will not interrupt |
51 * operation, but may be useful to complete, exceptionally, dependent stages |
51 * the underlying operation, but may be useful to complete, exceptionally, |
52 * that have not already completed. |
52 * dependent stages that have not already completed. |
|
53 * |
53 * |
54 * <p> Unless otherwise stated, {@code null} parameter values will cause methods |
54 * <p> Unless otherwise stated, {@code null} parameter values will cause methods |
55 * of all classes in this package to throw {@code NullPointerException}. |
55 * of all classes in this package to throw {@code NullPointerException}. |
56 * |
56 * |
57 * @since 11 |
57 * @since 11 |