PoolingHttpClientConnectionManager 和 PoolingClientConnectionManager 之间有什么区别。为什么 PoolingClientConnectionManager 被弃用了?该类的缺点是什么?
最佳答案
我在文档和 JIRA 中也找不到任何精确的引用。不过,还有一个更权威的来源。据原文git commit从 2012 年 11 月 4 日起添加了新类:
Connection management API redesign: deprecated ClientConnectionManager, ManagedClientConnection, OperatedClientConnection and ClientConnectionOperator in favor of a simpler HttpClientConnectionManager interface. The new API has a much smaller footprint and no longer supports the concept of managed or operated connections. Internal connection mangement (sic) logic is no longer exposed to the consumer
因此,除非您需要托管或操作连接,或者要访问内部连接管理,否则您应该更新以使用新名称。
除此之外,还发布了 4.3 版本从 2013 年 9 月开始,我们现在已经升级到 4.5.2,显然这已经经受住了时间的考验。
关于java - PoolingHttpClientConnectionManager 和 PoolingClientConnectionManager 有什么区别,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36107133/