Class HttpClientConfig.Builder
java.lang.Object
io.helidon.webclient.api.HttpConfigBase.BuilderBase<HttpClientConfig.Builder, HttpClientConfig>
io.helidon.webclient.api.HttpClientConfig.BuilderBase<HttpClientConfig.Builder, HttpClientConfig>
io.helidon.webclient.api.HttpClientConfig.Builder
- All Implemented Interfaces:
Prototype.Builder<HttpClientConfig.Builder, HttpClientConfig>, Builder<HttpClientConfig.Builder, HttpClientConfig>, ConfigBuilderSupport.ConfiguredBuilder<HttpClientConfig.Builder, HttpClientConfig>, Supplier<HttpClientConfig>
- Enclosing interface:
HttpClientConfig
public static class HttpClientConfig.Builder
extends HttpClientConfig.BuilderBase<HttpClientConfig.Builder, HttpClientConfig>
implements Builder<HttpClientConfig.Builder, HttpClientConfig>
Fluent API builder for
HttpClientConfig.-
Nested Class Summary
Nested classes/interfaces inherited from class HttpClientConfig.BuilderBase
HttpClientConfig.BuilderBase.HttpClientConfigImplModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations.Nested classes/interfaces inherited from class HttpConfigBase.BuilderBase
HttpConfigBase.BuilderBase.HttpConfigBaseImplModifier and TypeClassDescriptionprotected static classGenerated implementation of the prototype, can be extended by descendant prototype implementations. -
Method Summary
Modifier and TypeMethodDescriptionbuild()Create an instance from this builder.Create an instance of the prototype.Methods inherited from class HttpClientConfig.BuilderBase
addDefaultHeadersMap, addHeader, addHeader, addHeader, addHeader, addHeader, addHeader, addHeader, addHeaders, addMediaSupport, addMediaSupports, addRedirectSensitiveHeader, addRedirectSensitiveHeader, addRedirectSensitiveHeaders, addService, addServices, altSvc, altSvc, altSvc, altSvc, baseAddress, baseAddress, baseFragment, baseFragment, baseQuery, baseQuery, baseUri, baseUri, baseUri, baseUri, clearAltSvc, clearBaseAddress, clearBaseFragment, clearBaseQuery, clearBaseUri, clearCookieManager, clearHeaders, clearMediaSupports, clearRedirectSensitiveHeaders, clearServices, clearSni, config, connectionCacheSize, connectionCacheSize, connectionListener, connectionListener, contentEncoding, contentEncoding, contentEncoding, contentEncoding, contentEncoding, cookieManager, cookieManager, cookieManager, cookieManager, defaultHeadersMap, defaultHeadersMap, dnsAddressLookup, dnsAddressLookup, dnsResolver, dnsResolver, executor, executor, filterRedirectHeaders, filterRedirectHeaders, followCrossOriginEntityRedirects, followCrossOriginEntityRedirects, from, from, headers, headers, maxInMemoryEntity, maxInMemoryEntity, mediaContext, mediaContext, mediaContext, mediaContext, mediaContext, mediaSupports, mediaSupports, mediaTypeParserMode, mediaTypeParserMode, preBuildPrototype, readContinueTimeout, readContinueTimeout, redirectSensitiveHeaders, redirectSensitiveHeaders, relativeUris, relativeUris, sendExpectContinue, sendExpectContinue, serviceRegistry, serviceRegistry, services, services, servicesDiscoverServices, servicesDiscoverServices, shareConnectionCache, shareConnectionCache, sni, sni, sni, sni, socketOptions, socketOptions, socketOptions, socketOptions, toString, validatePrototype, writeBufferSize, writeBufferSizeModifier and TypeMethodDescriptionaddDefaultHeadersMap(Map<String, String> defaultHeadersMap) Default headers to be used in every request from configuration.Default headers to be used in every request.addHeader(HeaderName name, int value) Add a default header value.addHeader(HeaderName name, long value) Add a default header value.addHeader(HeaderName name, String value) Add a default header value.Add default header value.Add default header value.Add default header value.addHeaders(Set<? extends Header> headers) Default headers to be used in every request.addMediaSupport(MediaSupport mediaSupport) Media supports (manually added).addMediaSupports(List<? extends MediaSupport> mediaSupports) Media supports (manually added).addRedirectSensitiveHeader(HeaderName redirectSensitiveHeader) Request header names to strip on cross-origin redirects.addRedirectSensitiveHeader(String headerName) Add a header name to strip on cross-origin redirects.addRedirectSensitiveHeaders(Set<? extends HeaderName> redirectSensitiveHeaders) Request header names to strip on cross-origin redirects.addService(WebClientService service) WebClient services.addServices(List<? extends WebClientService> services) WebClient services.altSvc()Client policy for accepting and using HTTPAlt-Svcresponse advertisements.altSvc(ClientAltSvcConfig altSvc) Client policy for accepting and using HTTPAlt-Svcresponse advertisements.altSvc(Consumer<ClientAltSvcConfig.Builder> consumer) Client policy for accepting and using HTTPAlt-Svcresponse advertisements.altSvc(Supplier<? extends ClientAltSvcConfig> supplier) Client policy for accepting and using HTTPAlt-Svcresponse advertisements.Base address used by the client in all requests.baseAddress(SocketAddress baseAddress) Base address used by the client in all requests.Base fragment used by the client in all requests (unless overwritten on per-request basis).baseFragment(UriFragment baseFragment) Base fragment used by the client in all requests (unless overwritten on per-request basis).Base query used by the client in all requests.Base query used by the client in all requests.baseUri()Base uri used by the client in all requests.Base uri used by the client in all requests.Base URI of the client.Base URI of the client.Clear existing value of altSvc.Clear existing value of baseAddress.Clear existing value of baseFragment.Clear existing value of baseQuery.Clear existing value of baseUri.Clear existing value of cookieManager.Clear all headers.Clear all mediaSupports.Clear all redirectSensitiveHeaders.Clear all services.clearSni()Clear existing value of sni.Update builder from configuration (node of this type).intMaximum number of reusable physical connections each HTTP protocol retains for a single connection target.connectionCacheSize(int connectionCacheSize) Maximum number of reusable physical connections each HTTP protocol retains for a single connection target.Socket lifecycle callbacks.connectionListener(ConnectionListener connectionListener) Socket lifecycle callbacks.Configure the listener specificContentEncodingContext.contentEncoding(ContentEncodingContext contentEncoding) Configure the listener specificContentEncodingContext.contentEncoding(ContentEncodingContextConfig contentEncoding) Configure the listener specificContentEncodingContext.Configure the listener specificContentEncodingContext.contentEncoding(Supplier<? extends ContentEncodingContext> supplier) Configure the listener specificContentEncodingContext.WebClient cookie manager.cookieManager(WebClientCookieManager cookieManager) WebClient cookie manager.cookieManager(WebClientCookieManagerConfig cookieManager) WebClient cookie manager.WebClient cookie manager.Default headers to be used in every request from configuration.defaultHeadersMap(Map<String, String> defaultHeadersMap) Default headers to be used in every request from configuration.DNS address lookup preferences to be used by this client.dnsAddressLookup(DnsAddressLookup dnsAddressLookup) DNS address lookup preferences to be used by this client.DNS resolver to be used by this client.dnsResolver(DnsResolver dnsResolver) DNS resolver to be used by this client.executor()Client executor service.executor(ExecutorService executor) Client executor service.booleanWhether headers sensitive to cross-origin redirects should be filtered before the redirected request is sent.filterRedirectHeaders(boolean filterRedirectHeaders) Whether headers sensitive to cross-origin redirects should be filtered before the redirected request is sent.booleanWhether redirects that preserve request method and entity may be followed across origins.followCrossOriginEntityRedirects(boolean followCrossOriginEntityRedirects) Whether redirects that preserve request method and entity may be followed across origins.from(HttpClientConfig prototype) Update this builder from an existing prototype instance.from(HttpClientConfig.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.headers()Default headers to be used in every request.Default headers to be used in every request.intIf the entity is expected to be smaller that this number of bytes, it would be buffered in memory to optimize performance.maxInMemoryEntity(int maxInMemoryEntity) If the entity is expected to be smaller that this number of bytes, it would be buffered in memory to optimize performance.Configure the listener specificMediaContext.mediaContext(MediaContext mediaContext) Configure the listener specificMediaContext.mediaContext(MediaContextConfig mediaContext) Configure the listener specificMediaContext.mediaContext(Consumer<MediaContextConfig.Builder> consumer) Configure the listener specificMediaContext.mediaContext(Supplier<? extends MediaContext> supplier) Configure the listener specificMediaContext.Media supports (manually added).mediaSupports(List<? extends MediaSupport> mediaSupports) Media supports (manually added).Configure media type parsing mode for HTTPContent-Typeheader.mediaTypeParserMode(ParserMode mediaTypeParserMode) Configure media type parsing mode for HTTPContent-Typeheader.protected voidHandles providers and decorators.Socket 100-Continue read timeout.readContinueTimeout(Duration readContinueTimeout) Socket 100-Continue read timeout.Request header names to strip on cross-origin redirects.redirectSensitiveHeaders(Set<? extends HeaderName> redirectSensitiveHeaders) Request header names to strip on cross-origin redirects.booleanCan be set totrueto force the use of relative URIs in all requests, regardless of the presence or absence of proxies or no-proxy lists.relativeUris(boolean relativeUris) Can be set totrueto force the use of relative URIs in all requests, regardless of the presence or absence of proxies or no-proxy lists.booleanWhether Expect-100-Continue header is sent to verify server availability before sending an entity.sendExpectContinue(boolean sendExpectContinue) Whether Expect-100-Continue header is sent to verify server availability before sending an entity.Service registry used to discover providers and services.serviceRegistry(ServiceRegistry serviceRegistry) Service registry used to discover providers and services.services()WebClient services.services(List<? extends WebClientService> services) WebClient services.booleanService discovery flag forHttpClientConfig.BuilderBase.services().servicesDiscoverServices(boolean servicesDiscoverServices) Service discovery flag forHttpClientConfig.BuilderBase.services().booleanWhether to use protocol-specific JVM-wide connection caches shared by compatible WebClient instances.shareConnectionCache(boolean shareConnectionCache) Whether to use protocol-specific JVM-wide connection caches shared by compatible WebClient instances.sni()Client-side TLS SNI configuration.Client-side TLS SNI configuration.sni(Consumer<SniConfig.Builder> consumer) Client-side TLS SNI configuration.Client-side TLS SNI configuration.Socket options for connections opened by this client.socketOptions(SocketOptions socketOptions) Socket options for connections opened by this client.socketOptions(Consumer<SocketOptions.Builder> consumer) Socket options for connections opened by this client.socketOptions(Supplier<? extends SocketOptions> supplier) Socket options for connections opened by this client.toString()protected voidValidates required properties.intBuffer size used when writing data to the underlying socket on a client TCP connection.writeBufferSize(int writeBufferSize) Buffer size used when writing data to the underlying socket on a client TCP connection.Methods inherited from class HttpConfigBase.BuilderBase
addProperties, clearConnectTimeout, clearReadTimeout, config, connectTimeout, connectTimeout, followRedirects, followRedirects, from, from, keepAlive, keepAlive, maxRedirects, maxRedirects, properties, properties, proxy, proxy, proxy, proxy, putProperty, readTimeout, readTimeout, tls, tls, tls, tls, tlsModifier and TypeMethodDescriptionaddProperties(Map<String, String> properties) Properties configured for this client.Clear existing value of connectTimeout.Clear existing value of readTimeout.config()Configuration used to configure this instance.Connect timeout.connectTimeout(Duration connectTimeout) Connect timeout.booleanWhether to follow redirects.followRedirects(boolean followRedirects) Whether to follow redirects.from(HttpConfigBase prototype) Update this builder from an existing prototype instance.from(HttpConfigBase.BuilderBase<?, ?> builder) Update this builder from an existing prototype builder instance.booleanDetermines if connection keep alive is enabled (NOT socket keep alive, but HTTP connection keep alive, to re-use the same connection for multiple requests).keepAlive(boolean keepAlive) Determines if connection keep alive is enabled (NOT socket keep alive, but HTTP connection keep alive, to re-use the same connection for multiple requests).intMax number of followed redirects.maxRedirects(int maxRedirects) Max number of followed redirects.Properties configured for this client.properties(Map<String, String> properties) Properties configured for this client.proxy()Proxy configuration to be used for requests.Proxy configuration to be used for requests.proxy(Consumer<Proxy.Builder> consumer) Proxy configuration to be used for requests.Proxy configuration to be used for requests.putProperty(String key, String property) Properties configured for this client.Read timeout.readTimeout(Duration readTimeout) Read timeout.tls()TLS configuration for any TLS request from this client.TLS configuration for any TLS request from this client.TLS configuration for any TLS request from this client.tls(Consumer<TlsConfig.Builder> consumer) TLS configuration for any TLS request from this client.TLS configuration for any TLS request from this client.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Builder
get, identity, updateModifier and TypeMethodDescriptiondefault HttpClientConfigget()default HttpClientConfig.Builderidentity()Instance of this builder as the correct type.default HttpClientConfig.Builderupdate(Consumer<HttpClientConfig.Builder> consumer) Update the builder in a fluent API way.Methods inherited from interface Prototype.Builder
selfModifier and TypeMethodDescriptiondefault HttpClientConfig.Builderself()Instance of this builder as the correct type.
-
Method Details
-
buildPrototype
Create an instance of the prototype. Calling this method may update this builder from providers and decorators, so repeated calls may have side effects.- Specified by:
buildPrototypein interfacePrototype.Builder<HttpClientConfig.Builder, HttpClientConfig>- Returns:
- an instance of the setup object created from this builder
-
build
Create an instance from this builder. Calling this method may update this builder from providers and decorators, so repeated calls may have side effects.- Specified by:
buildin interfaceBuilder<HttpClientConfig.Builder, HttpClientConfig>- Returns:
- instance of the built type
-