Package com.anthropic.client.okhttp
Class OkHttpClient.Builder
-
- All Implemented Interfaces:
public final class OkHttpClient.Builder
-
-
Method Summary
Modifier and Type Method Description final OkHttpClient.Buildertimeout(Timeout timeout)final OkHttpClient.Buildertimeout(Duration timeout)final OkHttpClient.Builderproxy(Proxy proxy)final OkHttpClient.Builderbackend(Backend backend)final OkHttpClient.BuildermaxIdleConnections(Integer maxIdleConnections)Sets the maximum number of idle connections kept by the underlying ConnectionPool. final OkHttpClient.BuilderkeepAliveDuration(Duration keepAliveDuration)Sets the keep-alive duration for idle connections in the underlying ConnectionPool. final OkHttpClient.BuilderdispatcherExecutorService(ExecutorService dispatcherExecutorService)final OkHttpClient.BuildersslSocketFactory(SSLSocketFactory sslSocketFactory)final OkHttpClient.BuildertrustManager(X509TrustManager trustManager)final OkHttpClient.BuilderhostnameVerifier(HostnameVerifier hostnameVerifier)final OkHttpClientbuild()-
-
Method Detail
-
timeout
final OkHttpClient.Builder timeout(Timeout timeout)
-
timeout
final OkHttpClient.Builder timeout(Duration timeout)
-
proxy
final OkHttpClient.Builder proxy(Proxy proxy)
-
backend
final OkHttpClient.Builder backend(Backend backend)
-
maxIdleConnections
final OkHttpClient.Builder maxIdleConnections(Integer maxIdleConnections)
Sets the maximum number of idle connections kept by the underlying ConnectionPool.
If this is set, then keepAliveDuration must also be set.
If unset, then OkHttp's default is used.
-
keepAliveDuration
final OkHttpClient.Builder keepAliveDuration(Duration keepAliveDuration)
Sets the keep-alive duration for idle connections in the underlying ConnectionPool.
If this is set, then maxIdleConnections must also be set.
If unset, then OkHttp's default is used.
-
dispatcherExecutorService
final OkHttpClient.Builder dispatcherExecutorService(ExecutorService dispatcherExecutorService)
-
sslSocketFactory
final OkHttpClient.Builder sslSocketFactory(SSLSocketFactory sslSocketFactory)
-
trustManager
final OkHttpClient.Builder trustManager(X509TrustManager trustManager)
-
hostnameVerifier
final OkHttpClient.Builder hostnameVerifier(HostnameVerifier hostnameVerifier)
-
build
final OkHttpClient build()
-
-
-
-