List of usage examples for org.apache.http.conn HttpClientConnectionManager getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:org.apache.gobblin.http.ApacheHttpClient.java
private HttpClientConnectionManager getHttpConnManager(Config config) { HttpClientConnectionManager httpConnManager; String connMgrStr = config.getString(HTTP_CONN_MANAGER); switch (ConnManager.valueOf(connMgrStr.toUpperCase())) { case BASIC://from w w w .j a va 2 s. com httpConnManager = new BasicHttpClientConnectionManager(); break; case POOLING: PoolingHttpClientConnectionManager poolingConnMgr = new PoolingHttpClientConnectionManager(); poolingConnMgr.setMaxTotal(config.getInt(POOLING_CONN_MANAGER_MAX_TOTAL_CONN)); poolingConnMgr.setDefaultMaxPerRoute(config.getInt(POOLING_CONN_MANAGER_MAX_PER_CONN)); httpConnManager = poolingConnMgr; break; default: throw new IllegalArgumentException(connMgrStr + " is not supported"); } LOG.info("Using " + httpConnManager.getClass().getSimpleName()); return httpConnManager; }