Skip to content

Update Java docs for Apache Clients #6299

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 29, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,11 @@
import software.amazon.awssdk.utils.Validate;

/**
* An implementation of {@link SdkHttpClient} that uses Apache HTTP client to communicate with the service. This is the most
* powerful synchronous client that adds an extra dependency and additional startup latency in exchange for more functionality,
* like support for HTTP proxies.
*
* An implementation of {@link SdkHttpClient} that uses Apache HttpClient 4.x to communicate with the service. This is a
* full-featured synchronous client that adds an extra dependency and higher startup latency compared to
* <a href="https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/http-configuration-url.html">UrlConnectionHttpClient</a>
* in exchange for more functionality, like support for HTTP proxies.
*
* <p>See software.amazon.awssdk.http.urlconnection.UrlConnectionHttpClient for an alternative implementation.</p>
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,29 @@
import software.amazon.awssdk.utils.Validate;

/**
* An implementation of {@link SdkHttpClient} that uses Apache5 HTTP client to communicate with the service. This is the most
* powerful synchronous client that adds an extra dependency and additional startup latency in exchange for more functionality,
* like support for HTTP proxies.
* An implementation of {@link SdkHttpClient} that uses Apache HttpClient 5.x to communicate with the service. This is a
* full-featured synchronous client that adds an extra dependency and higher startup latency compared to
* <a href="https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/http-configuration-url.html">UrlConnectionHttpClient</a>
* in exchange for more functionality, like support for HTTP proxies.
*
* <p>See software.amazon.awssdk.http.urlconnection.UrlConnectionHttpClient for an alternative implementation.</p>
* <p><b>Note:</b> The higher startup latency is compared to UrlConnectionHttpClient, not to the Apache HttpClient 4.5.x
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this line is necessary. We already state above:

and higher startup latency compared to UrlConnectionHttpClient

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

* based client. Performance characteristics between Apache 4.5.x and 5.x clients are similar.</p>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the "Performance characteristics..." after the list of improvements.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

*
* <p>This client uses Apache HttpClient 5.x, which provides the following
* improvements over the Apache HttpClient 4.5.x based client:</p>
* <ul>
* <li>Modern Java ecosystem compatibility including virtual thread support for Java 21</li>
* <li>Active maintenance with regular security updates</li>
* <li>Enhanced logging flexibility through SLF4J (replacing problematic JCL dependencies)</li>
* </ul>
*
* <p>See
* <a href="https://docs.aws.amazon.com/sdk-for-java/latest/developer-guide/http-configuration-url.html">UrlConnectionHttpClient</a>
* for a lighter-weight alternative implementation.</p>
*
* <p>This can be created via {@link #builder()}</p>
*/

@SdkPreviewApi
@SdkPublicApi
public final class Apache5HttpClient implements SdkHttpClient {
Expand Down
Loading