cn.com.antcloud.api.acapi.HttpConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of antcloud-api-sdk Show documentation
Show all versions of antcloud-api-sdk Show documentation
Ant Fin Tech API SDK For Java
Copyright (c) 2015-present Alipay.com, https://www.alipay.com
The newest version!
package cn.com.antcloud.api.acapi;
/**
* 网络连接参数
*/
public class HttpConfig {
/**
* 连接配置
**/
private int maxIdleConnections = 5;
private Long maxIdleTimeMillis = 60 * 1000L;
private int keepAliveDurationMillis = 5000;
/**
* 超时设置
**/
private int connectionTimeoutMillis = 20000;
private int readTimeoutMillis = 20000;
private int writeTimeoutMillis = 20000;
/**
* 连接池配置
**/
private boolean enableConnectionPools = false;
// 最大连接数
private int maxRequests = 100;
// 每个目标主机的最大连接数
private int maxRequestsPerHost = 100;
/**
* 代理配置
*/
private String proxyHost;
private Integer proxyPort;
private String proxyUsername;
private String proxyPassword;
public int getMaxRequests() {
return maxRequests;
}
public void setMaxRequests(int maxRequests) {
this.maxRequests = maxRequests;
}
public int getMaxRequestsPerHost() {
return maxRequestsPerHost;
}
public void setMaxRequestsPerHost(int maxRequestsPerHost) {
this.maxRequestsPerHost = maxRequestsPerHost;
}
public int getMaxIdleConnections() {
return maxIdleConnections;
}
public void setMaxIdleConnections(int maxIdleConnections) {
this.maxIdleConnections = maxIdleConnections;
}
public Long getMaxIdleTimeMillis() {
return maxIdleTimeMillis;
}
public void setMaxIdleTimeMillis(Long maxIdleTimeMillis) {
this.maxIdleTimeMillis = maxIdleTimeMillis;
}
public int getKeepAliveDurationMillis() {
return keepAliveDurationMillis;
}
public void setKeepAliveDurationMillis(int keepAliveDurationMillis) {
this.keepAliveDurationMillis = keepAliveDurationMillis;
}
public int getConnectionTimeoutMillis() {
return connectionTimeoutMillis;
}
public void setConnectionTimeoutMillis(int connectionTimeoutMillis) {
this.connectionTimeoutMillis = connectionTimeoutMillis;
}
public int getReadTimeoutMillis() {
return readTimeoutMillis;
}
public void setReadTimeoutMillis(int readTimeoutMillis) {
this.readTimeoutMillis = readTimeoutMillis;
}
public int getWriteTimeoutMillis() {
return writeTimeoutMillis;
}
public void setWriteTimeoutMillis(int writeTimeoutMillis) {
this.writeTimeoutMillis = writeTimeoutMillis;
}
public String getProxyHost() {
return proxyHost;
}
public void setProxyHost(String proxyHost) {
this.proxyHost = proxyHost;
}
public Integer getProxyPort() {
return proxyPort;
}
public void setProxyPort(Integer proxyPort) {
this.proxyPort = proxyPort;
}
public String getProxyUsername() {
return proxyUsername;
}
public void setProxyUsername(String proxyUsername) {
this.proxyUsername = proxyUsername;
}
public String getProxyPassword() {
return proxyPassword;
}
public void setProxyPassword(String proxyPassword) {
this.proxyPassword = proxyPassword;
}
public boolean isEnableConnectionPools() {
return enableConnectionPools;
}
public void setEnableConnectionPools(boolean enableConnectionPools) {
this.enableConnectionPools = enableConnectionPools;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy