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 = 2000;
/**
* 请求处理的超时时间, 默认值: 5000 ms
*/
private long readTimeout = 5000;
/**
* 每个host的最大连接数, 默认值: 50
*/
private int maxConnectionsPerHost = 50;
/**
* 最大连接总数, 默认值: 200
*/
private int maxTotalConnections = 200;
/**
* 最大重试次数, 不包括首次调用, 默认值: 0
*/
private int maxAutoRetries = DEFAULT_MAX_AUTO_RETRIES;
private boolean followRedirects = false;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy