Skip to content

Commit 4e097bd

Browse files
committed
Add initial module for Apache5x for seting up package
1 parent f6adeaa commit 4e097bd

File tree

4 files changed

+111
-0
lines changed

4 files changed

+111
-0
lines changed

.brazil.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"modules": {
55
"annotations": { "packageName": "AwsJavaSdk-Core-Annotations" },
66
"apache-client": { "packageName": "AwsJavaSdk-HttpClient-ApacheClient" },
7+
"apache5-client": { "packageName": "AwsJavaSdk-HttpClient-Apache5Client" },
78
"arns": { "packageName": "AwsJavaSdk-Core-Arns" },
89
"auth": { "packageName": "AwsJavaSdk-Core-Auth" },
910
"auth-crt": { "packageName": "AwsJavaSdk-Core-AuthCrt" },

http-clients/apache5-client/pom.xml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!--
3+
~ Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
4+
~
5+
~ Licensed under the Apache License, Version 2.0 (the "License").
6+
~ You may not use this file except in compliance with the License.
7+
~ A copy of the License is located at
8+
~
9+
~ http://aws.amazon.com/apache2.0
10+
~
11+
~ or in the "license" file accompanying this file. This file is distributed
12+
~ on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13+
~ express or implied. See the License for the specific language governing
14+
~ permissions and limitations under the License.
15+
-->
16+
17+
<project xmlns="http://maven.apache.org/POM/4.0.0"
18+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
19+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
20+
<modelVersion>4.0.0</modelVersion>
21+
<parent>
22+
<artifactId>http-clients</artifactId>
23+
<groupId>software.amazon.awssdk</groupId>
24+
<version>2.31.33-SNAPSHOT</version>
25+
</parent>
26+
27+
<artifactId>apache5-client</artifactId>
28+
<name>AWS Java SDK :: HTTP Clients :: Apache5</name>
29+
30+
<dependencies>
31+
<dependency>
32+
<groupId>software.amazon.awssdk</groupId>
33+
<artifactId>http-client-spi</artifactId>
34+
<version>${awsjavasdk.version}</version>
35+
</dependency>
36+
</dependencies>
37+
38+
<build>
39+
<plugins>
40+
<plugin>
41+
<groupId>org.apache.maven.plugins</groupId>
42+
<artifactId>maven-jar-plugin</artifactId>
43+
<configuration>
44+
<archive>
45+
<manifestEntries>
46+
<Automatic-Module-Name>software.amazon.awssdk.http.apache5</Automatic-Module-Name>
47+
</manifestEntries>
48+
</archive>
49+
</configuration>
50+
</plugin>
51+
</plugins>
52+
</build>
53+
54+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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+
}

http-clients/pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<module>aws-crt-client</module>
3535
<module>netty-nio-client</module>
3636
<module>url-connection-client</module>
37+
<module>apache5-client</module>
3738
</modules>
3839

3940
<dependencyManagement>

0 commit comments

Comments
 (0)