java - PoolingHttpClientConnectionManager 和 PoolingClientConnectionManager 有什么区别

标签 java apache-httpclient-4.x

PoolingHttpClientConnectionManagerPoolingClientConnectionManager 之间有什么区别。为什么 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/

相关文章:

java - 如何在 android 中循环 json 数组?

java - ruby 线程编程,ruby 相当于 java wait/notify/notifyAll

android - AsynTask 中的文件类型错误

java - 如何解决 SSLPeerUnverifiedException : peer not authenticated after using InstallCert. java

Java重写函数,其中参数之一在子类中是常量

java - 使用 Heroku 迁移到 mLab 后创建 ParseObject

java - 使用 JDBC 将 RDBMS 转换为 OOP,将 SQL 转换为 Java

apache-httpclient-4.x - spring-ws 已弃用 DefaultHttpClient

java - 代理后面的 Apache Fluent HttpClient 导致未知主机

java - 带有 Rally rest api 的 SSLHandshakeException