@@ -454,6 +454,7 @@ public interface Builder extends SdkHttpClient.Builder<Apache5HttpClient.Builder
454
454
Builder dnsResolver (DnsResolver dnsResolver );
455
455
456
456
/**
457
+ * @deprecated this has been replaced with {{@link #tlsSocketStrategy(TlsSocketStrategy)}}
457
458
* Configuration that defines a custom Socket factory. If set to a null value, a default factory is used.
458
459
* <p>
459
460
* When set to a non-null value, the use of a custom factory implies the configuration options TRUST_ALL_CERTIFICATES,
@@ -463,7 +464,17 @@ public interface Builder extends SdkHttpClient.Builder<Apache5HttpClient.Builder
463
464
Builder socketFactory (SSLConnectionSocketFactory socketFactory );
464
465
465
466
466
- Builder tlsStrategy (TlsSocketStrategy tlsStrategy );
467
+ /**
468
+ * Configure a custom TLS strategy for SSL/TLS connections.
469
+ * This is the preferred method over the deprecated {@link #socketFactory(SSLConnectionSocketFactory)}.
470
+ *
471
+ * @param tlsSocketStrategy The TLS strategy to use for upgrading connections to TLS.
472
+ * If null, default TLS configuration will be used.
473
+ * @return This builder for method chaining
474
+
475
+ */
476
+
477
+ Builder tlsSocketStrategy (TlsSocketStrategy tlsSocketStrategy );
467
478
468
479
/**
469
480
* Configuration that defines an HTTP route planner that computes the route an HTTP request should take.
@@ -652,8 +663,8 @@ public Builder socketFactory(SSLConnectionSocketFactory socketFactory) {
652
663
}
653
664
654
665
@ Override
655
- public Builder tlsStrategy (TlsSocketStrategy tlsStrategy ) {
656
- this .tlsStrategy = tlsStrategy ;
666
+ public Builder tlsSocketStrategy (TlsSocketStrategy tlsSocketStrategy ) {
667
+ this .tlsStrategy = tlsSocketStrategy ;
657
668
this .legacySocketFactory = null ; // Clear any legacy factory
658
669
return this ;
659
670
}
0 commit comments