com.feingto.cloud.kit.http.ConnectProperties Maven / Gradle / Ivy
package com.feingto.cloud.kit.http;
import lombok.Data;
/**
* Http Connect 属性
*
* @author longfei
*/
@Data
public class ConnectProperties {
public static final int DEFAULT_MAX_AUTO_RETRIES = 0;
/**
* 连接超时时间, 默认值: 2000 ms
*/
private long connectTimeout = 2000L;
/**
* 读取超时时间, 默认值: 5000 ms
*/
private long readTimeout = 5000L;
/**
* 写入超时时间, 默认值: 5000 ms
*/
private long writeTimeout = 5000L;
/**
* 每个host的最大连接数, 默认值: 10
*/
private int maxConnectionsPerHost = 10;
/**
* 最大连接总数, 默认值: 100
*/
private int maxTotalConnections = 100;
/**
* 最大重试次数, 不包括首次调用, 默认值: 0
*/
private int maxAutoRetries = DEFAULT_MAX_AUTO_RETRIES;
private boolean followRedirects = false;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy