Class HttpClientBuilder

    • Field Detail

      • ENABLE_API_COMPATIBILITY_CHECK_SYSTEM_PROPERTY

        public static final java.lang.String ENABLE_API_COMPATIBILITY_CHECK_SYSTEM_PROPERTY
        See Also:
        Constant Field Values
    • Constructor Detail

      • HttpClientBuilder

        protected HttpClientBuilder()
    • Method Detail

      • fromConfig

        public HttpClientBuilder fromConfig​(java.util.function.Function<java.lang.String,​java.lang.String> configuration)
        Configure this HttpClientBuilder instance using a configuration object and standard Nessie configuration keys defined by the constants defined in NessieConfigConstants. Non-null values returned by the configuration-function will override previously configured values.
        Specified by:
        fromConfig in interface NessieClientBuilder<HttpClientBuilder>
        Parameters:
        configuration - The function that returns a configuration value for a configuration key.
        Returns:
        this
        See Also:
        fromSystemProperties()
      • withAuthenticationFromConfig

        @CanIgnoreReturnValue
        public HttpClientBuilder withAuthenticationFromConfig​(java.util.function.Function<java.lang.String,​java.lang.String> configuration)
        Configure only authentication in this HttpClientBuilder instance using a configuration object and standard Nessie configuration keys defined by the constants defined in NessieConfigConstants.
        Specified by:
        withAuthenticationFromConfig in interface NessieClientBuilder<HttpClientBuilder>
        Parameters:
        configuration - The function that returns a configuration value for a configuration key.
        Returns:
        this
        See Also:
        fromConfig(Function)
      • withTracing

        @CanIgnoreReturnValue
        public HttpClientBuilder withTracing​(boolean tracing)
        Whether to enable adding the HTTP headers of an active OpenTracing span to all Nessie requests. If enabled, the OpenTracing dependencies must be present at runtime.
        Parameters:
        tracing - true to enable passing HTTP headers for active tracing spans.
        Returns:
        this
      • withReadTimeout

        @CanIgnoreReturnValue
        public HttpClientBuilder withReadTimeout​(int readTimeoutMillis)
        Set the read timeout in milliseconds for this client. Timeout will throw HttpClientReadTimeoutException.
        Parameters:
        readTimeoutMillis - number of seconds to wait for a response from server.
        Returns:
        this
      • withConnectionTimeout

        @CanIgnoreReturnValue
        public HttpClientBuilder withConnectionTimeout​(int connectionTimeoutMillis)
        Set the connection timeout in milliseconds for this client. Timeout will throw HttpClientException.
        Parameters:
        connectionTimeoutMillis - number of seconds to wait to connect to the server.
        Returns:
        this
      • withDisableCompression

        @CanIgnoreReturnValue
        public HttpClientBuilder withDisableCompression​(boolean disableCompression)
        Set whether the compression shall be disabled or not.
        Parameters:
        disableCompression - whether the compression shall be disabled or not.
        Returns:
        this
      • withSSLContext

        @CanIgnoreReturnValue
        public HttpClientBuilder withSSLContext​(javax.net.ssl.SSLContext sslContext)
        Set the SSL context for this client.
        Parameters:
        sslContext - the SSL context to use
        Returns:
        this
      • withSSLParameters

        @CanIgnoreReturnValue
        public HttpClientBuilder withSSLParameters​(javax.net.ssl.SSLParameters sslParameters)
      • withHttp2Upgrade

        @CanIgnoreReturnValue
        public HttpClientBuilder withHttp2Upgrade​(boolean http2Upgrade)
      • withFollowRedirects

        @CanIgnoreReturnValue
        public HttpClientBuilder withFollowRedirects​(java.lang.String redirects)
      • withForceUrlConnectionClient

        @CanIgnoreReturnValue
        public HttpClientBuilder withForceUrlConnectionClient​(boolean forceUrlConnectionClient)
      • withEnableApiCompatibilityCheck

        @CanIgnoreReturnValue
        public HttpClientBuilder withEnableApiCompatibilityCheck​(boolean enable)