类org.apache.commons.httpclient.params.HostParams源码实例Demo

下面列出了怎么用org.apache.commons.httpclient.params.HostParams的API类实例代码及写法,或者点击链接到github查看源代码。

源代码1 项目: knopflerfish.org   文件: HostConfiguration.java
private void init(final HostConfiguration hostConfiguration) {
    // wrap all of the assignments in a synchronized block to avoid
    // having to negotiate the monitor for each method call
    synchronized (hostConfiguration) {
        try {
            if (hostConfiguration.host != null) {
                this.host = (HttpHost) hostConfiguration.host.clone();
            } else {
                this.host = null;
            }
            if (hostConfiguration.proxyHost != null) {
                this.proxyHost = (ProxyHost) hostConfiguration.proxyHost.clone();
            } else {
                this.proxyHost = null;
            }
            this.localAddress = hostConfiguration.getLocalAddress();
            this.params = (HostParams)hostConfiguration.getParams().clone();
        } catch (CloneNotSupportedException e) {
            throw new IllegalArgumentException("Host configuration could not be cloned");
        }
    }        
}
 
源代码2 项目: knopflerfish.org   文件: HostConfiguration.java
/**
 * Assigns {@link HostParams HTTP protocol parameters} specific to this host.
 * 
 * @since 3.0
 * 
 * @see HostParams
 */
public void setParams(final HostParams params) {
    if (params == null) {
        throw new IllegalArgumentException("Parameters may not be null");
    }
    this.params = params;
}
 
源代码3 项目: knopflerfish.org   文件: HostConfiguration.java
/**
 * Returns {@link HostParams HTTP protocol parameters} associated with this host.
 *
 * @return HTTP parameters.
 *
 * @since 3.0
 */
public HostParams getParams() {
    return this.params;
}
 
 类方法
 同包方法