- java.lang.Object
-
- com.github.mizosoft.methanol.Methanol.BaseBuilder<Methanol.Builder>
-
- com.github.mizosoft.methanol.Methanol.Builder
-
- All Implemented Interfaces:
java.net.http.HttpClient.Builder
- Enclosing class:
- Methanol
public static class Methanol.Builder extends Methanol.BaseBuilder<Methanol.Builder> implements java.net.http.HttpClient.Builder
A builder ofMethanolinstances.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Methanol.Builderauthenticator(java.net.Authenticator authenticator)Methanol.Buildercache(HttpCache cache)Sets theHttpCacheto be used by the client.Methanol.BuildercacheChain(java.util.List<HttpCache> caches)Sets a chain of caches to be called one after another, in the order specified by the given list.Methanol.BuilderconnectTimeout(java.time.Duration duration)Methanol.BuildercookieHandler(java.net.CookieHandler cookieHandler)Methanol.Builderexecutor(java.util.concurrent.Executor executor)Methanol.BuilderfollowRedirects(java.net.http.HttpClient.Redirect policy)Methanol.Builderpriority(int priority)Methanol.Builderproxy(java.net.ProxySelector proxySelector)Methanol.BuildersslContext(javax.net.ssl.SSLContext sslContext)Methanol.BuildersslParameters(javax.net.ssl.SSLParameters sslParameters)Methanol.Builderversion(java.net.http.HttpClient.Version version)-
Methods inherited from class com.github.mizosoft.methanol.Methanol.BaseBuilder
adapterCodec, apply, autoAcceptEncoding, backendInterceptor, baseUri, baseUri, build, defaultHeader, defaultHeaders, defaultHeaders, headersTimeout, headersTimeout, interceptor, postDecorationInterceptor, readTimeout, readTimeout, requestTimeout, userAgent
-
-
-
-
Method Detail
-
cache
@CanIgnoreReturnValue public Methanol.Builder cache(HttpCache cache)
Sets theHttpCacheto be used by the client.
-
cacheChain
@CanIgnoreReturnValue public Methanol.Builder cacheChain(java.util.List<HttpCache> caches)
Sets a chain of caches to be called one after another, in the order specified by the given list. Each cache forwards to the other till a suitable response is found or the request is sent to network. Although not enforced, it is highly recommended for the caches to be sorted in the order of decreasing locality.
-
cookieHandler
@CanIgnoreReturnValue public Methanol.Builder cookieHandler(java.net.CookieHandler cookieHandler)
- Specified by:
cookieHandlerin interfacejava.net.http.HttpClient.Builder
-
connectTimeout
@CanIgnoreReturnValue public Methanol.Builder connectTimeout(java.time.Duration duration)
- Specified by:
connectTimeoutin interfacejava.net.http.HttpClient.Builder
-
sslContext
@CanIgnoreReturnValue public Methanol.Builder sslContext(javax.net.ssl.SSLContext sslContext)
- Specified by:
sslContextin interfacejava.net.http.HttpClient.Builder
-
sslParameters
@CanIgnoreReturnValue public Methanol.Builder sslParameters(javax.net.ssl.SSLParameters sslParameters)
- Specified by:
sslParametersin interfacejava.net.http.HttpClient.Builder
-
executor
@CanIgnoreReturnValue public Methanol.Builder executor(java.util.concurrent.Executor executor)
- Specified by:
executorin interfacejava.net.http.HttpClient.Builder
-
followRedirects
@CanIgnoreReturnValue public Methanol.Builder followRedirects(java.net.http.HttpClient.Redirect policy)
- Specified by:
followRedirectsin interfacejava.net.http.HttpClient.Builder
-
version
@CanIgnoreReturnValue public Methanol.Builder version(java.net.http.HttpClient.Version version)
- Specified by:
versionin interfacejava.net.http.HttpClient.Builder
-
priority
@CanIgnoreReturnValue public Methanol.Builder priority(int priority)
- Specified by:
priorityin interfacejava.net.http.HttpClient.Builder
-
proxy
@CanIgnoreReturnValue public Methanol.Builder proxy(java.net.ProxySelector proxySelector)
- Specified by:
proxyin interfacejava.net.http.HttpClient.Builder
-
authenticator
@CanIgnoreReturnValue public Methanol.Builder authenticator(java.net.Authenticator authenticator)
- Specified by:
authenticatorin interfacejava.net.http.HttpClient.Builder
-
-