- /**
- * Returns the timeout in milliseconds used when requesting a connection
- * from the connection manager. A timeout value of zero is interpreted
- * as an infinite timeout.
- * <p>
- * A timeout value of zero is interpreted as an infinite timeout.
- * A negative value is interpreted as undefined (system default).
- * </p>
- * <p>
- * Default: {@code -1}
- * </p>
- */
- public int getConnectionRequestTimeout() {
- return connectionRequestTimeout;
- }
- /**
- * Determines the timeout in milliseconds until a connection is established.
- * A timeout value of zero is interpreted as an infinite timeout.
- * <p>
- * A timeout value of zero is interpreted as an infinite timeout.
- * A negative value is interpreted as undefined (system default).
- * </p>
- * <p>
- * Default: {@code -1}
- * </p>
- */
- public int getConnectTimeout() {
- return connectTimeout;
- }
- /**
- * Defines the socket timeout ({@code SO_TIMEOUT}) in milliseconds,
- * which is the timeout for waiting for data or, put differently,
- * a maximum period inactivity between two consecutive data packets).
- * <p>
- * A timeout value of zero is interpreted as an infinite timeout.
- * A negative value is interpreted as undefined (system default).
- * </p>
- * <p>
- * Default: {@code -1}
- * </p>
- */
- public int getSocketTimeout() {
- return socketTimeout;
- }
connectionRequestTimeout 从连接池获取连接的timeout
connectionTimeout 和服务器建立连接的timeout
socketTimeout 从服务器读取数据的timeout