Example usage for org.apache.commons.httpclient.params HttpConnectionParams setDefaults

List of usage examples for org.apache.commons.httpclient.params HttpConnectionParams setDefaults

Introduction

In this page you can find the example usage for org.apache.commons.httpclient.params HttpConnectionParams setDefaults.

Prototype

public void setDefaults(HttpParams paramHttpParams)

Source Link

Usage

From source file:org.globus.axis.transport.commons.CommonsHttpConnectionManager.java

private ExtendedHttpConnection getNewConnection(HostConfiguration hostConfiguration) {
    ExtendedHttpConnection httpConnection = new ExtendedHttpConnection(hostConfiguration, this.staleChecking);
    httpConnection.setHttpConnectionManager(this);
    HttpConnectionParams connectionParams = httpConnection.getParams();
    connectionParams.setDefaults(this.params);

    if (this.hostConfigurationParams != null) {
        HostParams hostParams = hostConfiguration.getParams();
        for (int i = 0; i < this.hostConfigurationParams.length; i++) {
            String key = this.hostConfigurationParams[i];
            Object value = hostParams.getParameter(key);
            if (value != null) {
                connectionParams.setParameter(key, value);
            }/*  w ww. j  a v a 2  s.  c  o  m*/
        }
    }

    if (logger.isDebugEnabled()) {
        logger.debug("got new connection: " + httpConnection);
    }

    return httpConnection;
}