Class HttpClientConfig.BuilderBase.HttpClientConfigImpl

java.lang.Object
io.helidon.webclient.api.HttpConfigBase.BuilderBase.HttpConfigBaseImpl
io.helidon.webclient.api.HttpClientConfig.BuilderBase.HttpClientConfigImpl
All Implemented Interfaces:
Prototype.Api, HttpClientConfig, HttpConfigBase
Direct Known Subclasses:
GrpcClientConfig.BuilderBase.GrpcClientConfigImpl, Http1ClientConfig.BuilderBase.Http1ClientConfigImpl, Http2ClientConfig.BuilderBase.Http2ClientConfigImpl, JsonRpcClientConfig.BuilderBase.JsonRpcClientConfigImpl, WebClientConfig.BuilderBase.WebClientConfigImpl, WsClientConfig.BuilderBase.WsClientConfigImpl
Enclosing class:
HttpClientConfig.BuilderBase<BUILDER extends HttpClientConfig.BuilderBase<BUILDER,PROTOTYPE>,PROTOTYPE extends HttpClientConfig>

protected static class HttpClientConfig.BuilderBase.HttpClientConfigImpl extends HttpConfigBase.BuilderBase.HttpConfigBaseImpl implements HttpClientConfig
Generated implementation of the prototype, can be extended by descendant prototype implementations.
  • Constructor Details

    • HttpClientConfigImpl

      protected HttpClientConfigImpl(HttpClientConfig.BuilderBase<?,?> builder)
      Create an instance providing a builder.
      Parameters:
      builder - extending builder base of this prototype
  • Method Details

    • baseUri

      public Optional<ClientUri> baseUri()
      Description copied from interface: HttpClientConfig
      Base uri used by the client in all requests.
      Specified by:
      baseUri in interface HttpClientConfig
      Returns:
      base uri of the client requests
    • baseQuery

      public Optional<UriQuery> baseQuery()
      Description copied from interface: HttpClientConfig
      Base query used by the client in all requests.
      Specified by:
      baseQuery in interface HttpClientConfig
      Returns:
      base query of the client requests
    • baseFragment

      public Optional<UriFragment> baseFragment()
      Description copied from interface: HttpClientConfig
      Base fragment used by the client in all requests (unless overwritten on per-request basis).
      Specified by:
      baseFragment in interface HttpClientConfig
      Returns:
      fragment to use
    • socketOptions

      public SocketOptions socketOptions()
      Description copied from interface: HttpClientConfig
      Socket options for connections opened by this client. If there is a value explicitly configured on this type and on the socket options, the one configured on this type's builder will win:
      Specified by:
      socketOptions in interface HttpClientConfig
      Returns:
      socket options
    • dnsResolver

      public DnsResolver dnsResolver()
      Description copied from interface: HttpClientConfig
      DNS resolver to be used by this client.
      Specified by:
      dnsResolver in interface HttpClientConfig
      Returns:
      dns resolver
    • dnsAddressLookup

      public DnsAddressLookup dnsAddressLookup()
      Description copied from interface: HttpClientConfig
      DNS address lookup preferences to be used by this client. Default value is determined by capabilities of the system.
      Specified by:
      dnsAddressLookup in interface HttpClientConfig
      Returns:
      dns address lookup strategy
    • defaultHeadersMap

      public Map<String,String> defaultHeadersMap()
      Description copied from interface: HttpClientConfig
      Default headers to be used in every request from configuration.
      Specified by:
      defaultHeadersMap in interface HttpClientConfig
      Returns:
      default headers
    • headers

      public Set<Header> headers()
      Description copied from interface: HttpClientConfig
      Default headers to be used in every request.
      Specified by:
      headers in interface HttpClientConfig
      Returns:
      default headers
    • mediaTypeParserMode

      public ParserMode mediaTypeParserMode()
      Description copied from interface: HttpClientConfig
      Configure media type parsing mode for HTTP Content-Type header.
      Specified by:
      mediaTypeParserMode in interface HttpClientConfig
      Returns:
      media type parsing mode
    • contentEncoding

      public ContentEncodingContext contentEncoding()
      Description copied from interface: HttpClientConfig
      Configure the listener specific ContentEncodingContext. This method discards all previously registered ContentEncodingContext. If no content encoding context is registered, default encoding context is used.
      Specified by:
      contentEncoding in interface HttpClientConfig
      Returns:
      content encoding context
    • mediaContext

      public MediaContext mediaContext()
      Description copied from interface: HttpClientConfig
      Configure the listener specific MediaContext. This method discards all previously registered MediaContext. If no media context is registered, default media context is used.
      Specified by:
      mediaContext in interface HttpClientConfig
      Returns:
      media context
    • mediaSupports

      public List<MediaSupport> mediaSupports()
      Description copied from interface: HttpClientConfig
      Media supports (manually added). If both HttpClientConfig.mediaContext() and this is configured, there will be a new context created from return of this method, with fallback of HttpClientConfig.mediaContext().
      Specified by:
      mediaSupports in interface HttpClientConfig
      Returns:
      list of explicitly added media supports
    • services

      public List<WebClientService> services()
      Description copied from interface: HttpClientConfig
      WebClient services.
      Specified by:
      services in interface HttpClientConfig
      Returns:
      services to use with this web client
    • relativeUris

      public boolean relativeUris()
      Description copied from interface: HttpClientConfig
      Can be set to true to force the use of relative URIs in all requests, regardless of the presence or absence of proxies or no-proxy lists.
      Specified by:
      relativeUris in interface HttpClientConfig
      Returns:
      relative URIs flag
    • executor

      public ExecutorService executor()
      Description copied from interface: HttpClientConfig
      Client executor service.
      Specified by:
      executor in interface HttpClientConfig
      Returns:
      executor service to use when needed (such as for HTTP/2)
    • sendExpectContinue

      public boolean sendExpectContinue()
      Description copied from interface: HttpClientConfig
      Whether Expect-100-Continue header is sent to verify server availability before sending an entity.

      Defaults to true.

      Specified by:
      sendExpectContinue in interface HttpClientConfig
      Returns:
      whether Expect:100-Continue header should be sent on streamed transfers
    • connectionCacheSize

      public int connectionCacheSize()
      Description copied from interface: HttpClientConfig
      Maximal size of the connection cache. For most HTTP protocols, we may cache connections to various endpoints for keep alive (or stream reuse in case of HTTP/2). This option limits the size. Setting this number lower than the "usual" number of target services will cause connections to be closed and reopened frequently.
      Specified by:
      connectionCacheSize in interface HttpClientConfig
    • cookieManager

      public Optional<WebClientCookieManager> cookieManager()
      Description copied from interface: HttpClientConfig
      WebClient cookie manager.
      Specified by:
      cookieManager in interface HttpClientConfig
      Returns:
      cookie manager to use
    • readContinueTimeout

      public Duration readContinueTimeout()
      Description copied from interface: HttpClientConfig
      Socket 100-Continue read timeout. Default is 1 second. This read timeout is used when 100-Continue is sent by the client, before it sends an entity.
      Specified by:
      readContinueTimeout in interface HttpClientConfig
      Returns:
      read 100-Continue timeout duration
    • shareConnectionCache

      public boolean shareConnectionCache()
      Description copied from interface: HttpClientConfig
      Whether to share connection cache between all the WebClient instances in JVM.
      Specified by:
      shareConnectionCache in interface HttpClientConfig
      Returns:
      true if connection cache is shared
    • maxInMemoryEntity

      public int maxInMemoryEntity()
      Description copied from interface: HttpClientConfig
      If the entity is expected to be smaller that this number of bytes, it would be buffered in memory to optimize performance. If bigger, streaming will be used.

      Note that for some entity types we cannot use streaming, as they are already fully in memory (String, byte[]), for such cases, this option is ignored. Default is 128Kb.

      Specified by:
      maxInMemoryEntity in interface HttpClientConfig
      Returns:
      maximal number of bytes to buffer in memory for supported writers
    • writeBufferSize

      public int writeBufferSize()
      Description copied from interface: HttpClientConfig
      Buffer size used when writing data to the underlying socket on a client TCP connection. A value that is less or equal to 1 can be set to disable buffering at this level. Note that if writing data to the socket in small chunks, they may not be delivered to the network immediately due to Nagle's algorithm (i.e., if TCP_NO_DELAY is turned off).
      Specified by:
      writeBufferSize in interface HttpClientConfig
      Returns:
      number of bytes in write buffer
    • toString

      public String toString()
      Overrides:
      toString in class HttpConfigBase.BuilderBase.HttpConfigBaseImpl
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class HttpConfigBase.BuilderBase.HttpConfigBaseImpl
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class HttpConfigBase.BuilderBase.HttpConfigBaseImpl
    • defaultRequestHeaders

      default ClientRequestHeaders defaultRequestHeaders()
      Default headers as a headers object. Creates a new instance for each call, so the returned value can be safely mutated.
      Returns:
      default headers