All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.gitee.summer9102.develop.common.httpclient.ProxyHttpClientProperties Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
package com.gitee.summer9102.develop.common.httpclient;

import org.springframework.boot.context.properties.ConfigurationProperties;

@ConfigurationProperties(prefix = "proxy.http.client")
public class ProxyHttpClientProperties {
    /**
     * 是否启用
     */
    private boolean enabled = false;
    private String proxyHost;
    private int proxyPort;
    /**
     * 用户名
     */
    private String proxyUser;
    /**
     * 密码
     */
    private String proxyPass;
    /**
     * 最大连接数
     */
    private int httpMaxPoolSize = 20;
    /**
     * 获取/建立连接超时时间
     */
    private int connectTimeout = 10000;
    /**
     * 获取数据超时时间
     */
    private int socketTimeout = 30000;
    /**
     * 最大空闲时间
     */
    private int maxIdleTime = 30000;

    public boolean isEnabled() {
        return enabled;
    }

    public void setEnabled(boolean enabled) {
        this.enabled = enabled;
    }

    public String getProxyHost() {
        return proxyHost;
    }

    public void setProxyHost(String proxyHost) {
        this.proxyHost = proxyHost;
    }

    public int getProxyPort() {
        return proxyPort;
    }

    public void setProxyPort(int proxyPort) {
        this.proxyPort = proxyPort;
    }

    public String getProxyUser() {
        return proxyUser;
    }

    public void setProxyUser(String proxyUser) {
        this.proxyUser = proxyUser;
    }

    public String getProxyPass() {
        return proxyPass;
    }

    public void setProxyPass(String proxyPass) {
        this.proxyPass = proxyPass;
    }

    public int getHttpMaxPoolSize() {
        return httpMaxPoolSize;
    }

    public void setHttpMaxPoolSize(int httpMaxPoolSize) {
        this.httpMaxPoolSize = httpMaxPoolSize;
    }

    public int getConnectTimeout() {
        return connectTimeout;
    }

    public void setConnectTimeout(int connectTimeout) {
        this.connectTimeout = connectTimeout;
    }

    public int getSocketTimeout() {
        return socketTimeout;
    }

    public void setSocketTimeout(int socketTimeout) {
        this.socketTimeout = socketTimeout;
    }

    public int getMaxIdleTime() {
        return maxIdleTime;
    }

    public void setMaxIdleTime(int maxIdleTime) {
        this.maxIdleTime = maxIdleTime;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy