RFR: 8296804: Document HttpClient configuration properties in java.net.http module-info

Daniel Fuchs dfuchs at openjdk.org
Fri Nov 18 14:38:21 UTC 2022


On Fri, 18 Nov 2022 13:50:51 GMT, Michael McMahon <michaelm at openjdk.org> wrote:

> Hi,
> 
> Could I get the following doc change reviewed please? It documents the system/networking properties used by the java.net.http HTTP client in its module-info. (CSR to follow)
> 
> Thanks,
> Michael

I think we should limit ourselves to document properties that are of interest to users of the API - so probably looking at what is documented in the [Java Core Libraries Developer's Guide](https://docs.oracle.com/en/java/javase/19/core/java-networking.html#GUID-86B96A42-74FE-4E7D-8E60-D64A03862083)

Also it should be made clear that these system properties should be specified on the java command line (no guarantee that a value specified with System.setProperty() willl be taken into account) and are implementation specific properties, not part of the specification. That is - another implementation of `java.net.http.HttpClient` may not support them or may support a different set.

src/java.net.http/share/classes/module-info.java line 96:

> 94:  * <li><p><b>{@systemProperty jdk.httpclient.keepalive.timeout}</b> (default: 1200)<br>
> 95:  * The number of seconds to keep idle HTTP/1.1 connections alive in the keep alive cache.
> 96:  * </li>

This is no longer strictly true. Also `jdk.httpclient.keepalive.timeout.h2` should be documented, see [JDK-8295649](https://bugs.openjdk.org/browse/JDK-8295649)

src/java.net.http/share/classes/module-info.java line 134:

> 132:  * <li><p><b>{@systemProperty jdk.internal.httpclient.hpack.debug}</b> (default: false)<br>
> 133:  * Enables general HTTP/2 HPACK debug tracing.
> 134:  * </li>

These three *.debug properties are too low level and should not be documented.

-------------

PR: https://git.openjdk.org/jdk/pull/11241


More information about the net-dev mailing list