JavaのHttpClientとしてapache HttpClient(4.5.1)を使用しています。
HTTPリクエストの設定において、connectionRequestTimeout
とconnectTimeout
を設定することができますが、この2つの違いが判りません。
以下、getterのjavadocになりますが、知見ございましたらご教示いただけますと幸いです。
java
1 /** 2 * Returns the timeout in milliseconds used when requesting a connection 3 * from the connection manager. A timeout value of zero is interpreted 4 * as an infinite timeout. 5 * <p> 6 * A timeout value of zero is interpreted as an infinite timeout. 7 * A negative value is interpreted as undefined (system default). 8 * </p> 9 * <p> 10 * Default: {@code -1} 11 * </p> 12 */ 13 public int getConnectionRequestTimeout() { 14 return connectionRequestTimeout; 15 } 16 17 /** 18 * Determines the timeout in milliseconds until a connection is established. 19 * A timeout value of zero is interpreted as an infinite timeout. 20 * <p> 21 * A timeout value of zero is interpreted as an infinite timeout. 22 * A negative value is interpreted as undefined (system default). 23 * </p> 24 * <p> 25 * Default: {@code -1} 26 * </p> 27 */ 28 public int getConnectTimeout() { 29 return connectTimeout; 30 }

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2015/12/29 04:33
2015/12/29 12:26