类 HttpTransportConfig
java.lang.Object
io.agentscope.core.model.transport.HttpTransportConfig
Configuration for HTTP transport layer.
This class holds configuration options for HTTP client behavior such as timeouts, connection pool settings, and retry policies.
-
嵌套类概要
嵌套类 -
字段概要
字段 -
方法概要
修饰符和类型方法说明static HttpTransportConfig.Builderbuilder()Create a new builder for HttpTransportConfig.static HttpTransportConfigdefaults()Create a default configuration.Get the connect timeout.Get the HTTP version.Get the keep-alive duration for idle connections.intGet the maximum number of idle connections in the pool.Get the proxy configuration.Get the read timeout.Get the write timeout.booleanGet whether SSL certificate verification should be ignored.
-
字段详细资料
-
DEFAULT_CONNECT_TIMEOUT
Default connect timeout: 30 seconds. -
DEFAULT_READ_TIMEOUT
Default read timeout: 5 minutes (for long-running model calls). -
DEFAULT_WRITE_TIMEOUT
Default write timeout: 30 seconds.
-
-
方法详细资料
-
getConnectTimeout
Get the connect timeout.- 返回:
- the connect timeout duration
-
getReadTimeout
Get the read timeout.- 返回:
- the read timeout duration
-
getWriteTimeout
Get the write timeout.- 返回:
- the write timeout duration
-
getMaxIdleConnections
public int getMaxIdleConnections()Get the maximum number of idle connections in the pool.- 返回:
- the max idle connections
-
getKeepAliveDuration
Get the keep-alive duration for idle connections.- 返回:
- the keep-alive duration
-
isIgnoreSsl
public boolean isIgnoreSsl()Get whether SSL certificate verification should be ignored.Warning: Setting this to true disables SSL certificate verification, which makes the connection vulnerable to man-in-the-middle attacks. This should only be used for testing or with trusted self-signed certificates.
- 返回:
- true to ignore SSL certificate verification, false otherwise
-
getProxyConfig
Get the proxy configuration.- 返回:
- the proxy configuration, or null if no proxy is configured
-
getHttpVersion
Get the HTTP version.- 返回:
- the HTTP version
-
builder
Create a new builder for HttpTransportConfig.- 返回:
- a new Builder instance
-
defaults
Create a default configuration.- 返回:
- a default HttpTransportConfig instance
-