Class HttpClientFactory.Builder
java.lang.Object
cloud.opencode.base.oauth2.http.HttpClientFactory.Builder
- Enclosing class:
HttpClientFactory
HTTP Client Builder
HTTP 客户端构建器
- Since:
- JDK 25, opencode-base-oauth2 V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()Build the HTTP client 构建 HTTP 客户端connectTimeout(Duration connectTimeout) Set the connection timeout 设置连接超时connectTimeoutSeconds(long seconds) Set connection timeout in seconds 设置连接超时(秒)readTimeout(Duration readTimeout) Set the read timeout 设置读取超时readTimeoutSeconds(long seconds) Set read timeout in seconds 设置读取超时(秒)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
connectTimeout
Set the connection timeout 设置连接超时- Parameters:
connectTimeout- the connection timeout | 连接超时- Returns:
- this builder | 此构建器
-
readTimeout
Set the read timeout 设置读取超时- Parameters:
readTimeout- the read timeout | 读取超时- Returns:
- this builder | 此构建器
-
connectTimeoutSeconds
Set connection timeout in seconds 设置连接超时(秒)- Parameters:
seconds- the timeout in seconds | 超时时间(秒)- Returns:
- this builder | 此构建器
-
readTimeoutSeconds
Set read timeout in seconds 设置读取超时(秒)- Parameters:
seconds- the timeout in seconds | 超时时间(秒)- Returns:
- this builder | 此构建器
-
build
Build the HTTP client 构建 HTTP 客户端- Returns:
- the HTTP client | HTTP 客户端
-