Class Methanol.Builder
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 class Methanol.Builder
extends Methanol.BaseBuilder<Methanol.Builder>
implements HttpClient.Builder
A builder of
Methanol instances.-
Field Summary
Fields inherited from interface HttpClient.Builder
NO_PROXY -
Method Summary
Modifier and TypeMethodDescriptionauthenticator(Authenticator authenticator) Sets theHttpCacheto 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 Methanol.BaseBuilder
adapterCodec, apply, autoAcceptEncoding, backendInterceptor, baseUri, baseUri, build, defaultHeader, defaultHeaders, defaultHeaders, headersTimeout, headersTimeout, interceptor, postDecorationInterceptor, readTimeout, readTimeout, requestTimeout, userAgentMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface HttpClient.Builder
build, localAddress
-
Method Details
-
cache
Sets theHttpCacheto 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:
cookieHandlerin interfaceHttpClient.Builder
-
connectTimeout
- Specified by:
connectTimeoutin interfaceHttpClient.Builder
-
sslContext
- Specified by:
sslContextin interfaceHttpClient.Builder
-
sslParameters
- Specified by:
sslParametersin interfaceHttpClient.Builder
-
executor
- Specified by:
executorin interfaceHttpClient.Builder
-
followRedirects
- Specified by:
followRedirectsin interfaceHttpClient.Builder
-
version
- Specified by:
versionin interfaceHttpClient.Builder
-
priority
- Specified by:
priorityin interfaceHttpClient.Builder
-
proxy
- Specified by:
proxyin interfaceHttpClient.Builder
-
authenticator
- Specified by:
authenticatorin interfaceHttpClient.Builder
-