本文整理了Java中org.apache.commons.httpclient.HostConfiguration.getProxyPort()
方法的一些代码示例,展示了HostConfiguration.getProxyPort()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。HostConfiguration.getProxyPort()
方法的具体详情如下:
包路径:org.apache.commons.httpclient.HostConfiguration
类名称:HostConfiguration
方法名:getProxyPort
[英]Returns the proxyPort.
[中]返回代理端口。
代码示例来源:origin: commons-httpclient/commons-httpclient
/**
* Creates a new HTTP connection for the given host configuration.
*
* @param hostConfiguration the host/proxy/protocol to use
*/
public HttpConnection(HostConfiguration hostConfiguration) {
this(hostConfiguration.getProxyHost(),
hostConfiguration.getProxyPort(),
hostConfiguration.getHost(),
hostConfiguration.getPort(),
hostConfiguration.getProtocol());
this.localAddress = hostConfiguration.getLocalAddress();
}
代码示例来源:origin: commons-httpclient/commons-httpclient
httpConnection.setProxyPort(hostConfiguration.getProxyPort());
} else {
finishLastResponse(httpConnection);
代码示例来源:origin: org.swordapp/sword-common
/**
* Create a new Client. The client will not use authentication by default.
*/
public Client() {
client = new HttpClient();
client.getParams().setParameter("http.socket.timeout",
new Integer(DEFAULT_TIMEOUT));
log.debug("proxy host: " + client.getHostConfiguration().getProxyHost());
log.debug("proxy port: " + client.getHostConfiguration().getProxyPort());
doAuthentication = false;
}
代码示例来源:origin: org.dspace/dspace-sword-api
/**
* Create a new Client. The client will not use authentication by default.
*/
public Client() {
client = new HttpClient();
client.getParams().setParameter("http.socket.timeout",
Integer.valueOf(DEFAULT_TIMEOUT));
log.debug("proxy host: " + client.getHostConfiguration().getProxyHost());
log.debug("proxy port: " + client.getHostConfiguration().getProxyPort());
doAuthentication = false;
}
代码示例来源:origin: com.sun.jersey.contribs/jersey-apache-client
private HostConfiguration getHostConfiguration(HttpClient client, Map<String, Object> props) {
Object proxy = props.get(ApacheHttpClientConfig.PROPERTY_PROXY_URI);
if (proxy != null) {
URI proxyUri = getProxyUri(proxy);
String proxyHost = proxyUri.getHost();
if (proxyHost == null) {
proxyHost = "localhost";
}
int proxyPort = proxyUri.getPort();
if (proxyPort == -1) {
proxyPort = 8080;
}
HostConfiguration hostConfig = new HostConfiguration(client.getHostConfiguration());
String setHost = hostConfig.getProxyHost();
int setPort = hostConfig.getProxyPort();
if ((setHost == null)
|| (!setHost.equals(proxyHost))
|| (setPort == -1)
|| (setPort != proxyPort)) {
hostConfig.setProxyHost(new ProxyHost(proxyHost, proxyPort));
}
return hostConfig;
} else {
return null;
}
}
代码示例来源:origin: org.mule.transports/mule-transport-http
/**
* Creates a new HTTP connection for the given host configuration.
*
* @param hostConfiguration the host/proxy/protocol to use
*/
public HttpConnection(HostConfiguration hostConfiguration) {
this(hostConfiguration.getProxyHost(),
hostConfiguration.getProxyPort(),
hostConfiguration.getHost(),
hostConfiguration.getPort(),
hostConfiguration.getProtocol());
this.localAddress = hostConfiguration.getLocalAddress();
}
代码示例来源:origin: org.apache.commons/httpclient
/**
* Creates a new HTTP connection for the given host configuration.
*
* @param hostConfiguration the host/proxy/protocol to use
*/
public HttpConnection(HostConfiguration hostConfiguration) {
this(hostConfiguration.getProxyHost(),
hostConfiguration.getProxyPort(),
hostConfiguration.getHost(),
hostConfiguration.getPort(),
hostConfiguration.getProtocol());
this.localAddress = hostConfiguration.getLocalAddress();
}
代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.httpclient
/**
* Creates a new HTTP connection for the given host configuration.
*
* @param hostConfiguration the host/proxy/protocol to use
*/
public HttpConnection(HostConfiguration hostConfiguration) {
this(hostConfiguration.getProxyHost(),
hostConfiguration.getProxyPort(),
hostConfiguration.getHost(),
hostConfiguration.getPort(),
hostConfiguration.getProtocol());
this.localAddress = hostConfiguration.getLocalAddress();
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient
/**
* Creates a new HTTP connection for the given host configuration.
*
* @param hostConfiguration the host/proxy/protocol to use
*/
public HttpConnection(HostConfiguration hostConfiguration) {
this(hostConfiguration.getProxyHost(),
hostConfiguration.getProxyPort(),
hostConfiguration.getHost(),
hostConfiguration.getPort(),
hostConfiguration.getProtocol());
this.localAddress = hostConfiguration.getLocalAddress();
}
代码示例来源:origin: org.wso2.commons-httpclient/commons-httpclient
/**
* Creates a new HTTP connection for the given host configuration.
*
* @param hostConfiguration the host/proxy/protocol to use
*/
public HttpConnection(HostConfiguration hostConfiguration) {
this(hostConfiguration.getProxyHost(),
hostConfiguration.getProxyPort(),
hostConfiguration.getHost(),
hostConfiguration.getPort(),
hostConfiguration.getProtocol());
this.localAddress = hostConfiguration.getLocalAddress();
}
代码示例来源:origin: org.zaproxy/zap
/**
* Creates a new HTTP connection for the given host configuration.
*
* @param hostConfiguration the host/proxy/protocol to use
*/
public HttpConnection(HostConfiguration hostConfiguration) {
this(hostConfiguration.getProxyHost(),
hostConfiguration.getProxyPort(),
hostConfiguration.getHost(),
hostConfiguration.getPort(),
hostConfiguration.getProtocol());
this.localAddress = hostConfiguration.getLocalAddress();
}
代码示例来源:origin: org.netpreserve.openwayback/openwayback-core
hostConfiguration.getProxyPort() );
代码示例来源:origin: iipc/openwayback
hostConfiguration.getProxyPort() );
代码示例来源:origin: org.apache.commons/com.springsource.org.apache.commons.httpclient
httpConnection.setProxyPort(hostConfiguration.getProxyPort());
} else {
finishLastResponse(httpConnection);
代码示例来源:origin: org.apache.commons/httpclient
httpConnection.setProxyPort(hostConfiguration.getProxyPort());
} else {
finishLastResponse(httpConnection);
代码示例来源:origin: org.wso2.commons-httpclient/commons-httpclient
httpConnection.setProxyPort(hostConfiguration.getProxyPort());
} else {
finishLastResponse(httpConnection);
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient
httpConnection.setProxyPort(hostConfiguration.getProxyPort());
} else {
finishLastResponse(httpConnection);
代码示例来源:origin: org.netpreserve.commons/webarchive-commons
httpConnection.setProxyPort(hostConfiguration.getProxyPort());
代码示例来源:origin: org.netpreserve.commons/commons-web
httpConnection.setProxyPort(hostConfiguration.getProxyPort());
代码示例来源:origin: iipc/webarchive-commons
httpConnection.setProxyPort(hostConfiguration.getProxyPort());
内容来源于网络,如有侵权,请联系作者删除!