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

shz.core.net.HttpRequestConfig Maven / Gradle / Ivy

There is a newer version: 2024.0.2
Show newest version
package shz.core.net;

import javax.net.ssl.SSLContext;
public class HttpRequestConfig {
    private String proxyHost;
    private int proxyPort;
    private SSLContext sslContext;

    /**
     * 响应数据
     */
    private boolean doInput = true;
    /**
     * 请求携带数据
     */
    private boolean doOutput = false;
    /**
     * 自某个特定日期以来被修改过的数据
     */
    private long ifModifiedSince;

    private boolean useCaches = true;
    /**
     * 在访问有密码保护的资源时弹出对话框,以便查询用户名和口令
     */
    private boolean allowUserInteraction;

    private int connectTimeoutMillis = 10000;
    private int readTimeoutMillis = 10000;

    /**
     * 手动重定向次数
     */
    private int redirects = -1;

    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 SSLContext getSslContext() {
        return sslContext;
    }

    public void setSslContext(SSLContext sslContext) {
        this.sslContext = sslContext;
    }

    public boolean isDoInput() {
        return doInput;
    }

    public void setDoInput(boolean doInput) {
        this.doInput = doInput;
    }

    public boolean isDoOutput() {
        return doOutput;
    }

    public void setDoOutput(boolean doOutput) {
        this.doOutput = doOutput;
    }

    public long getIfModifiedSince() {
        return ifModifiedSince;
    }

    public void setIfModifiedSince(long ifModifiedSince) {
        this.ifModifiedSince = ifModifiedSince;
    }

    public boolean isUseCaches() {
        return useCaches;
    }

    public void setUseCaches(boolean useCaches) {
        this.useCaches = useCaches;
    }

    public boolean isAllowUserInteraction() {
        return allowUserInteraction;
    }

    public void setAllowUserInteraction(boolean allowUserInteraction) {
        this.allowUserInteraction = allowUserInteraction;
    }

    public int getConnectTimeoutMillis() {
        return connectTimeoutMillis;
    }

    public void setConnectTimeoutMillis(int connectTimeoutMillis) {
        this.connectTimeoutMillis = connectTimeoutMillis;
    }

    public int getReadTimeoutMillis() {
        return readTimeoutMillis;
    }

    public void setReadTimeoutMillis(int readTimeoutMillis) {
        this.readTimeoutMillis = readTimeoutMillis;
    }

    public int getRedirects() {
        return redirects;
    }

    public void setRedirects(int redirects) {
        this.redirects = redirects;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy