Package org.miaixz.bus.http.accord
Class ConnectionSelector
java.lang.Object
org.miaixz.bus.http.accord.ConnectionSelector
处理连接规范回退策略:当安全套接字连接由于握手/协议问题而失败时, 可能会使用不同的协议重试连接。实例是有状态的,应该创建并用于单个连接尝试
- Since:
- Java 17+
- Author:
- Kimi Liu
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
ConnectionSelector
-
-
Method Details
-
configureSecureSocket
- Parameters:
sslSocket- ssl套接字- Returns:
- 套接字连接的配置
- Throws:
IOException- 如果套接字不支持任何可用的TLS模式
-
connectionFailed
报告连接失败。确定下一个要尝试的ConnectionSuite(如果有的话)- Parameters:
ex- 异常信息- Returns:
- 如果需要使用
configureSecureSocket(SSLSocket)或false重试连接, 则为true;如果不需要重试连接,则为configureSecureSocket(SSLSocket)或false
-