Skip to content

Commit c159d0c

Browse files
alexw91millems
authored andcommitted
Update to new API
1 parent 0878ffb commit c159d0c

File tree

4 files changed

+8
-14
lines changed

4 files changed

+8
-14
lines changed

http-clients/aws-crt-client/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<dependency>
3434
<groupId>software.amazon.awssdk.crt</groupId>
3535
<artifactId>aws-crt</artifactId>
36-
<version>0.3.19</version>
36+
<version>0.3.22</version>
3737
</dependency>
3838

3939
<!--SDK dependencies-->

http-clients/aws-crt-client/src/main/java/software/amazon/awssdk/http/crt/AwsCrtAsyncHttpClient.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import software.amazon.awssdk.crt.http.HttpConnectionPoolManager;
3333
import software.amazon.awssdk.crt.http.HttpHeader;
3434
import software.amazon.awssdk.crt.http.HttpRequest;
35-
import software.amazon.awssdk.crt.http.HttpRequestOptions;
3635
import software.amazon.awssdk.crt.io.ClientBootstrap;
3736
import software.amazon.awssdk.crt.io.SocketOptions;
3837
import software.amazon.awssdk.crt.io.TlsCipherPreference;
@@ -135,7 +134,10 @@ public String clientName() {
135134
private HttpConnectionPoolManager createConnectionPool(URI uri) {
136135
Validate.notNull(uri, "URI must not be null");
137136
log.debug(() -> "Creating ConnectionPool for: URI:" + uri + ", MaxConns: " + maxConnectionsPerEndpoint);
138-
return new HttpConnectionPoolManager(bootstrap, socketOptions, tlsContext, uri, windowSize, maxConnectionsPerEndpoint);
137+
138+
return new HttpConnectionPoolManager(bootstrap, socketOptions, tlsContext, uri,
139+
HttpConnectionPoolManager.DEFAULT_MAX_BUFFER_SIZE, windowSize,
140+
maxConnectionsPerEndpoint);
139141
}
140142

141143
private HttpConnectionPoolManager getOrCreateConnectionPool(URI uri) {
@@ -225,9 +227,6 @@ public CompletableFuture<Void> execute(AsyncExecuteRequest asyncRequest) {
225227

226228
CompletableFuture<Void> requestFuture = new CompletableFuture<>();
227229

228-
229-
HttpRequestOptions reqOptions = new HttpRequestOptions();
230-
231230
// When a Connection is ready from the Connection Pool, schedule the Request on the connection
232231
crtConnPool.acquireConnection()
233232
.whenComplete((crtConn, throwable) -> {
@@ -241,7 +240,7 @@ public CompletableFuture<Void> execute(AsyncExecuteRequest asyncRequest) {
241240
new AwsCrtAsyncHttpStreamAdapter(crtConn, requestFuture, asyncRequest, windowSize);
242241

243242
// Submit the Request on this Connection
244-
invokeSafely(() -> crtConn.makeRequest(crtRequest, reqOptions, crtToSdkAdapter));
243+
invokeSafely(() -> crtConn.makeRequest(crtRequest, crtToSdkAdapter));
245244
});
246245

247246
return requestFuture;

http-clients/aws-crt-client/src/main/java/software/amazon/awssdk/http/crt/internal/AwsCrtAsyncHttpStreamAdapter.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,16 +80,11 @@ public void onResponseHeaders(HttpStream stream, int responseStatusCode, HttpHea
8080
}
8181

8282
@Override
83-
public void onResponseHeadersDone(HttpStream stream, boolean hasBody) {
83+
public void onResponseHeadersDone(HttpStream stream, int headerType) {
8484
initRespBodyPublisherIfNeeded(stream);
8585

8686
respBuilder.statusCode(stream.getResponseStatusCode());
8787
sdkRequest.responseHandler().onHeaders(respBuilder.build());
88-
89-
if (!hasBody) {
90-
respBodyPublisher.setQueueComplete();
91-
}
92-
9388
sdkRequest.responseHandler().onStream(respBodyPublisher);
9489
}
9590

test/sdk-benchmarks/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@
193193
<dependency>
194194
<groupId>software.amazon.awssdk.crt</groupId>
195195
<artifactId>aws-crt</artifactId>
196-
<version>0.3.17</version>
196+
<version>0.3.22</version>
197197
<scope>compile</scope>
198198
</dependency>
199199
<dependency>

0 commit comments

Comments
 (0)