@@ -454,6 +454,7 @@ public interface Builder extends SdkHttpClient.Builder<Apache5HttpClient.Builder
454454 Builder dnsResolver (DnsResolver dnsResolver );
455455
456456 /**
457+ * @deprecated this has been replaced with {{@link #tlsSocketStrategy(TlsSocketStrategy)}}
457458 * Configuration that defines a custom Socket factory. If set to a null value, a default factory is used.
458459 * <p>
459460 * 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
463464 Builder socketFactory (SSLConnectionSocketFactory socketFactory );
464465
465466
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 );
467478
468479 /**
469480 * 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) {
652663 }
653664
654665 @ Override
655- public Builder tlsStrategy (TlsSocketStrategy tlsStrategy ) {
656- this .tlsStrategy = tlsStrategy ;
666+ public Builder tlsSocketStrategy (TlsSocketStrategy tlsSocketStrategy ) {
667+ this .tlsStrategy = tlsSocketStrategy ;
657668 this .legacySocketFactory = null ; // Clear any legacy factory
658669 return this ;
659670 }
0 commit comments