java.lang.Object
com.github.mizosoft.methanol.Methanol.BaseBuilder<Methanol.Builder>
com.github.mizosoft.methanol.Methanol.Builder
- All Implemented Interfaces:
HttpClient.Builder
- Enclosing class:
Methanol
public static final class Methanol.Builder
extends Methanol.BaseBuilder<Methanol.Builder>
implements HttpClient.Builder
A builder of
Methanol
instances.-
Field Summary
Fields inherited from interface java.net.http.HttpClient.Builder
NO_PROXY
-
Method Summary
Modifier and TypeMethodDescriptionauthenticator
(Authenticator authenticator) Sets theHttpCache
to be used by the client.cacheChain
(List<HttpCache> caches) Sets a chain of caches to be called, one after another, in the order specified by the given list.connectTimeout
(Duration duration) cookieHandler
(CookieHandler cookieHandler) followRedirects
(HttpClient.Redirect policy) priority
(int priority) proxy
(ProxySelector proxySelector) sslContext
(SSLContext sslContext) sslParameters
(SSLParameters sslParameters) version
(HttpClient.Version version) Methods inherited from class com.github.mizosoft.methanol.Methanol.BaseBuilder
adapterCodec, apply, autoAcceptEncoding, backendInterceptor, baseUri, baseUri, build, defaultHeader, defaultHeaders, headersTimeout, headersTimeout, interceptor, postDecorationInterceptor, readTimeout, readTimeout, requestTimeout, userAgent
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.net.http.HttpClient.Builder
build, localAddress
-
Method Details
-
cache
Sets theHttpCache
to be used by the client. -
cacheChain
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
- Specified by:
cookieHandler
in interfaceHttpClient.Builder
-
connectTimeout
- Specified by:
connectTimeout
in interfaceHttpClient.Builder
-
sslContext
- Specified by:
sslContext
in interfaceHttpClient.Builder
-
sslParameters
- Specified by:
sslParameters
in interfaceHttpClient.Builder
-
executor
- Specified by:
executor
in interfaceHttpClient.Builder
-
followRedirects
- Specified by:
followRedirects
in interfaceHttpClient.Builder
-
version
- Specified by:
version
in interfaceHttpClient.Builder
-
priority
- Specified by:
priority
in interfaceHttpClient.Builder
-
proxy
- Specified by:
proxy
in interfaceHttpClient.Builder
-
authenticator
- Specified by:
authenticator
in interfaceHttpClient.Builder
-