|
| 1 | +/* |
| 2 | + * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"). |
| 5 | + * You may not use this file except in compliance with the License. |
| 6 | + * A copy of the License is located at |
| 7 | + * |
| 8 | + * http://aws.amazon.com/apache2.0 |
| 9 | + * |
| 10 | + * or in the "license" file accompanying this file. This file is distributed |
| 11 | + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either |
| 12 | + * express or implied. See the License for the specific language governing |
| 13 | + * permissions and limitations under the License. |
| 14 | + */ |
| 15 | + |
| 16 | +package software.amazon.awssdk.http.apache5; |
| 17 | + |
| 18 | +import software.amazon.awssdk.annotations.SdkPublicApi; |
| 19 | +import software.amazon.awssdk.http.ExecutableHttpRequest; |
| 20 | +import software.amazon.awssdk.http.HttpExecuteRequest; |
| 21 | +import software.amazon.awssdk.http.SdkHttpClient; |
| 22 | + |
| 23 | +/** |
| 24 | + * An implementation of {@link SdkHttpClient} that uses Apache HTTP Client 5.x to communicate with the service. This client |
| 25 | + * provides enhanced functionality over the URL connection client, including support for HTTP proxies, connection pooling, |
| 26 | + * and advanced configuration options. |
| 27 | + * |
| 28 | + * <p>This implementation leverages Apache HttpClient 5.x, offering improved performance characteristics and better compliance |
| 29 | + * with HTTP standards compared to the Apache 4.x-based.</p> |
| 30 | + * |
| 31 | + * <p>See software.amazon.awssdk.http.urlconnection.UrlConnectionHttpClient for a lighter alternative implementation |
| 32 | + * with fewer dependencies but more limited functionality.</p> |
| 33 | + * |
| 34 | + */ |
| 35 | +@SdkPublicApi |
| 36 | +public class Apache5HttpClient implements SdkHttpClient { |
| 37 | + |
| 38 | + public static final String CLIENT_NAME = "Apache5"; |
| 39 | + |
| 40 | + @Override |
| 41 | + public ExecutableHttpRequest prepareRequest(HttpExecuteRequest request) { |
| 42 | + throw new UnsupportedOperationException("API implementation is in progress"); |
| 43 | + } |
| 44 | + |
| 45 | + @Override |
| 46 | + public void close() { |
| 47 | + throw new UnsupportedOperationException("API implementation is in progress"); |
| 48 | + } |
| 49 | + |
| 50 | + @Override |
| 51 | + public String clientName() { |
| 52 | + return CLIENT_NAME; |
| 53 | + } |
| 54 | + |
| 55 | +} |
0 commit comments