@Override public void setParams(HttpConnectionManagerParams params) { wrapped.setParams(params); } }
/** * Sets <code>HTTPConnectionManagerSettings</code>. * * @param connectionManagerSettings The connection manager settings. */ public void setConnectionManagerSettings(HTTPConnectionManagerSettings connectionManagerSettings) { this.connectionManagerSettings = connectionManagerSettings; initHttpConnectionManagerParams(connectionManagerSettings); connectionManager = new MultiThreadedHttpConnectionManager(); connectionManager.setParams(connectionParams); }
/** * Sets <code>HTTPConnectionManagerSettings</code>. * * @param connectionManagerSettings The connection manager settings. */ public void setConnectionManagerSettings(HTTPConnectionManagerSettings connectionManagerSettings) { this.connectionManagerSettings = connectionManagerSettings; initHttpConnectionManagerParams(connectionManagerSettings); connectionManager = new MultiThreadedHttpConnectionManager(); connectionManager.setParams(connectionParams); }
/** * Configure http client */ private void configureHttpClient(){ HttpConnectionManager manager = new MultiThreadedHttpConnectionManager(); HttpConnectionManagerParams params = new HttpConnectionManagerParams(); manager.setParams(params); client = new HttpClient(manager); client.getParams().setAuthenticationPreemptive(false); }
HttpConnectionManagerParams cmparams = new HttpConnectionManagerParams(); cmparams.setSoTimeout(10000); cmparams.setTcpNoDelay(true); HttpConnectionManager manager = new SimpleHttpConnectionManager(); manager.setParams(cmparams); params = new HttpClientParams(); params.setSoTimeout(5000); client = new HttpClient(params, manager);
/** * This created httpclient pool that can be used to connect to external entity. This connection can be configured * via broker.xml by setting up the required http connection parameters. * * @return an instance of HttpClient that is configured with MultiThreadedHttpConnectionManager */ private HttpClient createHttpClient() { HttpConnectionManagerParams params = new HttpConnectionManagerParams(); params.setDefaultMaxConnectionsPerHost(config.getMaximumHttpConnectionPerHost()); params.setMaxTotalConnections(config.getMaximumTotalHttpConnection()); HttpConnectionManager connectionManager = new MultiThreadedHttpConnectionManager(); connectionManager.setParams(params); return new HttpClient(connectionManager); } }
httpClient.getHttpConnectionManager().setParams(params);
public SPARQLConnection(SPARQLRepository repository, String url, PrefixHashSet subjects) { super(repository); this.url = url; this.subjects = subjects; // Use MultiThreadedHttpConnectionManager to allow concurrent access on // HttpClient HttpConnectionManager manager = new MultiThreadedHttpConnectionManager(); // Allow 20 concurrent connections to the same host (default is 2) HttpConnectionManagerParams params = new HttpConnectionManagerParams(); params.setDefaultMaxConnectionsPerHost(20); params.setStaleCheckingEnabled(false); manager.setParams(params); HttpClientParams clientParams = new HttpClientParams(); clientParams.setParameter(HttpMethodParams.USER_AGENT, APP_NAME + "/" + VERSION + " " + clientParams.getParameter(HttpMethodParams.USER_AGENT)); client = new HttpClient(clientParams, manager); }
connectionManager.setParams(params);
manager.setParams(params); client.setHttpConnectionManager(manager);
manager.setParams(params); client.setHttpConnectionManager(manager);
thisHttpConnectionManager.setParams(connectionManagerParams);
clientConnectionManager.setParams(params);