RFR: 8350279: HttpClient: Add a new HttpResponse method to identify connections [v5]

Daniel Fuchs dfuchs at openjdk.org
Wed Apr 2 11:15:00 UTC 2025


On Tue, 1 Apr 2025 19:11:02 GMT, Volkan Yazici <vyazici at openjdk.org> wrote:

>> Adds `HttpResponse::connectionLabel` method that provides an identifier for the connection.
>> 
>> **Implementation note:** The feature is facilitated by `HttpConnection::label`, which should not be confused with `HttpConnection::id`. This distinction is explained in the JavaDoc of both properties.
>
> Volkan Yazici has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Apply review suggestions

src/java.net.http/share/classes/jdk/internal/net/http/HttpConnection.java line 100:

> 98:      * {@link PlainHttpConnection} it wraps will share the same label. As a
> 99:      * result, compared to {@link #id}, this label does not give a total order
> 100:      * among instances.

Suggestion:

    /**
     * A label to identify the connection.
     * <p>
     * This label helps with associating multiple components participating in a
     * connection. For instance, an {@link AsyncSSLConnection} and the
     * {@link PlainHttpConnection} it wraps will share the same label.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24154#discussion_r2024608425


More information about the net-dev mailing list