Examples of HttpConnectionManagerParams


Examples of org.apache.commons.httpclient.params.HttpConnectionManagerParams

            http = new HttpClient(m);
        } else {
            m = http.getHttpConnectionManager();
        }

        HttpConnectionManagerParams mp = m.getParams();
        if (config.getMaxConnections() != null) {
          mp.setMaxTotalConnections(config.getMaxConnections());
          mp.setMaxConnectionsPerHost(HostConfiguration.ANY_HOST_CONFIGURATION, config.getMaxConnections());
        }

        HttpClientParams cp = http.getParams();
        if (config.getTimeout() != null) {
            mp.setConnectionTimeout(config.getTimeout().intValue());
            cp.setConnectionManagerTimeout(config.getTimeout());
            cp.setSoTimeout(config.getTimeout().intValue());
        }
        if (config.getRetryHandler() != null) {
            cp.setParameter(HttpMethodParams.RETRY_HANDLER, config.getRetryHandler());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.