类 HttpTransportConfig

java.lang.Object
io.agentscope.core.model.transport.HttpTransportConfig

public class HttpTransportConfig extends Object
Configuration for HTTP transport layer.

This class holds configuration options for HTTP client behavior such as timeouts, connection pool settings, and retry policies.

  • 字段详细资料

    • DEFAULT_CONNECT_TIMEOUT

      public static final Duration DEFAULT_CONNECT_TIMEOUT
      Default connect timeout: 30 seconds.
    • DEFAULT_READ_TIMEOUT

      public static final Duration DEFAULT_READ_TIMEOUT
      Default read timeout: 5 minutes (for long-running model calls).
    • DEFAULT_WRITE_TIMEOUT

      public static final Duration DEFAULT_WRITE_TIMEOUT
      Default write timeout: 30 seconds.
  • 方法详细资料

    • getConnectTimeout

      public Duration getConnectTimeout()
      Get the connect timeout.
      返回:
      the connect timeout duration
    • getReadTimeout

      public Duration getReadTimeout()
      Get the read timeout.
      返回:
      the read timeout duration
    • getWriteTimeout

      public 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

      public Duration 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

      public ProxyConfig getProxyConfig()
      Get the proxy configuration.
      返回:
      the proxy configuration, or null if no proxy is configured
    • getHttpVersion

      public HttpVersion getHttpVersion()
      Get the HTTP version.
      返回:
      the HTTP version
    • builder

      public static HttpTransportConfig.Builder builder()
      Create a new builder for HttpTransportConfig.
      返回:
      a new Builder instance
    • defaults

      public static HttpTransportConfig defaults()
      Create a default configuration.
      返回:
      a default HttpTransportConfig instance