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

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

Introduction

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

Prototype

public void setParameter(String paramString, Object paramObject) 

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 w  w  .ja  v a 2 s. co  m*/
        }
    }

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

    return httpConnection;
}