日期:2014-05-19 浏览次数:20914 次
client.setConnectionTimeout(connectionTimeout);
client.setTimeout(timeout);
client.setHttpConnectionFactoryTimeout(httpConnectionFactoryTimeout);
PoolingClientConnectionManager cm = new PoolingClientConnectionManager(schemeRegistry);
// Increase max total connection to 200
cm.setMaxTotal(200);
// Increase default max connection per route to 20
cm.setDefaultMaxPerRoute(20);