List of usage examples for org.apache.http.conn.params ConnManagerParamBean setMaxTotalConnections
public void setMaxTotalConnections(final int maxConnections)
From source file:org.apache.camel.component.http4.HttpComponent.java
protected ClientConnectionManager createConnectionManager() { SchemeRegistry schemeRegistry = new SchemeRegistry(); // configure additional configurations HttpParams params = new BasicHttpParams(); ConnManagerParamBean param = new ConnManagerParamBean(params); if (getMaxTotalConnections() > 0) { param.setMaxTotalConnections(getMaxTotalConnections()); }// w w w .j a v a 2 s . c o m if (getConnectionsPerRoute() > 0) { param.setConnectionsPerRoute(new ConnPerRouteBean(getConnectionsPerRoute())); } ThreadSafeClientConnManager answer = new ThreadSafeClientConnManager(params, schemeRegistry); LOG.info("Created ClientConnectionManager " + answer); return answer; }