package com.philisense.www.utils;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;


@Configuration
public class HttpPoolConfig {
    @Value("${httpclient.maxtotal}")
    public Integer maxTotal;
    @Value("${httpclient.defaultMaxPerRoute}")
    public Integer defaultMaxPerRoute;
    /**
     * 连接上服务器(握手成功)的时间，超出抛出connect timeout
     */
    @Value("${httpclient.connectTimeout}")
    public Integer connectTimeout;
    /**
     * 从连接池中获取连接的超时时间，超时间未拿到可用连接，会抛出org.apache.http.conn.ConnectionPoolTimeoutException: Timeout waiting for connection from pool
     */
    @Value("${httpclient.connectionRequestTimeout}")
    public Integer connectionRequestTimeout;
    /**
     * 服务器返回数据(response)的时间，超过抛出read timeout
     */
    @Value("${httpclient.socketTimeout}")
    public Integer socketTimeout;
    @Value("${httpclient.validateAfterInactivity}")
    public Integer validateAfterInactivity;


}
