Builder
public static class Builder
io/agentscope/core/model/transport/HttpTransportConfig.java:199–352HttpTransportConfig的构建器。位于 io.agentscope.core.model.transport 包。核心成员包括 connectTimeout、responseTimeout、streamIdleTimeout、readTimeout、writeTimeout、maxIdleConnections。
Builder for HttpTransportConfig.
方法摘要Method Summary
方法详情Method Detail
connectTimeout
public Builder connectTimeout(Duration connectTimeout)
设置连接超时。
Set the connect timeout.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
connectTimeout | Duration | 连接超时时长。the connect timeout duration |
Builderio/agentscope/core/model/transport/HttpTransportConfig.java:217–220responseTimeout
public Builder responseTimeout(Duration responseTimeout)
设置响应超时。
Set the response timeout for streaming requests.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
responseTimeout | Duration | 响应超时时长。the response timeout duration |
Builderio/agentscope/core/model/transport/HttpTransportConfig.java:232–235streamIdleTimeout
public Builder streamIdleTimeout(Duration streamIdleTimeout)
设置该配置项。
Set the stream idle timeout.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
streamIdleTimeout | Duration | 流 Idle 超时(类型 `Duration`)。the stream idle timeout duration |
Builderio/agentscope/core/model/transport/HttpTransportConfig.java:247–250readTimeout
public Builder readTimeout(Duration readTimeout)
设置读取超时。
Set the read timeout.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
readTimeout | Duration | 读取超时时长。the read timeout duration |
Builderio/agentscope/core/model/transport/HttpTransportConfig.java:263–266writeTimeout
public Builder writeTimeout(Duration writeTimeout)
设置写入超时。
Set the write timeout.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
writeTimeout | Duration | 写入超时时长。the write timeout duration |
Builderio/agentscope/core/model/transport/HttpTransportConfig.java:274–277maxIdleConnections
public Builder maxIdleConnections(int maxIdleConnections)
设置该配置项。
Set the maximum number of idle connections in the pool.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
maxIdleConnections | int | 最大 Idle Connections(类型 `int`)。the max idle connections |
Builderio/agentscope/core/model/transport/HttpTransportConfig.java:285–288keepAliveDuration
public Builder keepAliveDuration(Duration keepAliveDuration)
设置该配置项。
Set the keep-alive duration for idle connections.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
keepAliveDuration | Duration | keep Alive 时长(类型 `Duration`)。the keep-alive duration |
Builderio/agentscope/core/model/transport/HttpTransportConfig.java:296–299ignoreSsl
public Builder ignoreSsl(boolean ignoreSsl)
设置该配置项。
Set whether to ignore SSL certificate verification.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
ignoreSsl | boolean | ignore Ssl(类型 `boolean`)。true to ignore SSL certificate verification, false otherwise |
Builderio/agentscope/core/model/transport/HttpTransportConfig.java:311–314proxy
public Builder proxy(ProxyConfig proxyConfig)
设置代理配置。
Set the proxy configuration.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
proxyConfig | ProxyConfig | 代理配置。the proxy configuration |
Builderio/agentscope/core/model/transport/HttpTransportConfig.java:324–327httpVersion
public Builder httpVersion(HttpVersion httpVersion)
设置HTTP 版本。
Set the HTTP version, or null for automatic resolution (the default): cleartext requests use HTTP/1.1, https requests use HTTP/2 via ALPN.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
httpVersion | HttpVersion | HTTP 版本(类型 `HttpVersion`)。the HTTP version, or null for auto |
Builderio/agentscope/core/model/transport/HttpTransportConfig.java:339–342build
public HttpTransportConfig build()
构建HttpTransportConfig。
Build the HttpTransportConfig.
HttpTransportConfigio/agentscope/core/model/transport/HttpTransportConfig.java:349–351