@@ -161,6 +161,15 @@ public static Builder builder() {
161
161
return new DefaultBuilder ();
162
162
}
163
163
164
+ /**
165
+ * Create a {@link AwsCrtAsyncHttpClient} client with the default configuration
166
+ *
167
+ * @return an {@link SdkAsyncHttpClient}
168
+ */
169
+ public static SdkAsyncHttpClient create () {
170
+ return new DefaultBuilder ().build ();
171
+ }
172
+
164
173
@ Override
165
174
public String clientName () {
166
175
return AWS_COMMON_RUNTIME ;
@@ -356,16 +365,14 @@ public interface Builder extends SdkAsyncHttpClient.Builder<AwsCrtAsyncHttpClien
356
365
Builder tlsCipherPreference (TlsCipherPreference tlsCipherPreference );
357
366
358
367
/**
359
- * The AWS CRT WindowSize to use for this HttpClient.
360
- *
361
- * For an http/1.1 connection, this represents the number of unread bytes that can be buffered in the
362
- * ResponseBodyPublisher before we stop reading from the underlying TCP socket and wait for the Subscriber
368
+ * Configures the number of unread bytes that can be buffered in the
369
+ * client before we stop reading from the underlying TCP socket and wait for the Subscriber
363
370
* to read more data.
364
371
*
365
- * @param initialWindowSize The AWS Common Runtime WindowSize
372
+ * @param readBufferSize The number of bytes that can be buffered
366
373
* @return The builder of the method chaining.
367
374
*/
368
- Builder initialWindowSize (int initialWindowSize );
375
+ Builder readBufferSize (int readBufferSize );
369
376
370
377
/**
371
378
* The AWS CRT EventLoopGroup to use for this Client.
@@ -389,24 +396,30 @@ public interface Builder extends SdkAsyncHttpClient.Builder<AwsCrtAsyncHttpClien
389
396
Builder proxyConfiguration (ProxyConfiguration proxyConfiguration );
390
397
391
398
/**
392
- * Sets the http monitoring options for all connections established by this client.
399
+ * Sets the http proxy configuration to use for this client.
400
+ *
401
+ * @param proxyConfigurationBuilderConsumer The consumer of the proxy configuration builder object.
402
+ * @return the builder for method chaining.
403
+ */
404
+ Builder proxyConfiguration (Consumer <ProxyConfiguration .Builder > proxyConfigurationBuilderConsumer );
405
+
406
+ /**
407
+ * Configure the health checks for for all connections established by this client.
408
+ *
409
+ * <p>
410
+ * eg: you can set a throughput threshold for the a connection to be considered healthy.
411
+ * If the connection falls below this threshold for a configurable amount of time,
412
+ * then the connection is considered unhealthy and will be shut down.
413
+ *
393
414
* @param monitoringOptions The http monitoring options to use
394
415
* @return The builder of the method chaining.
395
416
*/
396
- Builder monitoringOptions (HttpMonitoringOptions monitoringOptions );
417
+ Builder connectionHealthChecksConfiguration (HttpMonitoringOptions monitoringOptions );
397
418
398
419
/**
399
420
* Configure the maximum amount of time that a connection should be allowed to remain open while idle.
400
421
*/
401
422
Builder connectionMaxIdleTime (Duration connectionMaxIdleTime );
402
-
403
- /**
404
- * Sets the http proxy configuration to use for this client.
405
- *
406
- * @param proxyConfigurationBuilderConsumer The consumer of the proxy configuration builder object.
407
- * @return the builder for method chaining.
408
- */
409
- Builder proxyConfiguration (Consumer <ProxyConfiguration .Builder > proxyConfigurationBuilderConsumer );
410
423
}
411
424
412
425
/**
@@ -455,7 +468,7 @@ public Builder tlsCipherPreference(TlsCipherPreference tlsCipherPreference) {
455
468
}
456
469
457
470
@ Override
458
- public Builder initialWindowSize (int initialWindowSize ) {
471
+ public Builder readBufferSize (int initialWindowSize ) {
459
472
Validate .isPositive (initialWindowSize , "initialWindowSize" );
460
473
this .initialWindowSize = initialWindowSize ;
461
474
return this ;
@@ -480,7 +493,7 @@ public Builder proxyConfiguration(ProxyConfiguration proxyConfiguration) {
480
493
}
481
494
482
495
@ Override
483
- public Builder monitoringOptions (HttpMonitoringOptions monitoringOptions ) {
496
+ public Builder connectionHealthChecksConfiguration (HttpMonitoringOptions monitoringOptions ) {
484
497
this .monitoringOptions = monitoringOptions ;
485
498
return this ;
486
499
}
0 commit comments