Interface NessieClientBuilder

    • Method Detail

      • name

        java.lang.String name()
        The name of the Nessie client implementation, for example HTTP for the HTTP/REST client.
      • priority

        int priority()
        Priority ordinal used to select the most relevant NessieClientBuilder implementation.
      • asInstanceOf

        <I extends NessieClientBuilder> I asInstanceOf​(java.lang.Class<I> builderInterfaceType)
      • withApiCompatibilityCheck

        @CanIgnoreReturnValue
        NessieClientBuilder withApiCompatibilityCheck​(boolean enable)
      • withAuthenticationFromConfig

        @CanIgnoreReturnValue
        NessieClientBuilder 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.
        Parameters:
        configuration - The function that returns a configuration value for a configuration key.
        Returns:
        this
        See Also:
        fromConfig(Function)
      • withUri

        @CanIgnoreReturnValue
        NessieClientBuilder withUri​(java.net.URI uri)
        Set the Nessie server URI. A server URI must be configured.
        Parameters:
        uri - server URI
        Returns:
        this
      • withUri

        @CanIgnoreReturnValue
        NessieClientBuilder withUri​(java.lang.String uri)
        Convenience method for withUri(URI) taking a string.
        Parameters:
        uri - server URI
        Returns:
        this
      • withReadTimeout

        @CanIgnoreReturnValue
        NessieClientBuilder withReadTimeout​(int readTimeoutMillis)
        Sets the read-timeout in milliseconds for remote requests.
      • withConnectionTimeout

        @CanIgnoreReturnValue
        NessieClientBuilder withConnectionTimeout​(int connectionTimeoutMillis)
        Sets the connect-timeout in milliseconds for remote requests.
      • withDisableCompression

        @CanIgnoreReturnValue
        NessieClientBuilder withDisableCompression​(boolean disableCompression)
        Disables compression for remote requests.
      • withSSLContext

        @CanIgnoreReturnValue
        NessieClientBuilder withSSLContext​(javax.net.ssl.SSLContext sslContext)
        Optionally configure a specific SSLContext, currently only the Java 11+ accepts this option.
      • withSSLParameters

        @CanIgnoreReturnValue
        NessieClientBuilder withSSLParameters​(javax.net.ssl.SSLParameters sslParameters)
        Optionally configure specific SSLParameters.
      • createClientBuilderFromSystemSettings

        static NessieClientBuilder createClientBuilderFromSystemSettings()
        Constructs a client builder instance using config settings from Java system properties, process environment, Nessie client config file ~/.config/nessie/nessie-client.properties, dot-env file ~/.env.
      • createClientBuilder

        @Nonnull
        @Nonnull
        static NessieClientBuilder createClientBuilder​(java.lang.String clientName,
                                                       java.lang.String clientBuilderImpl)
        Returns the Nessie client builder that matches the requested client name or client builder implementation class.

        Nessie clients are discovered using Java's service loader mechanism.

        The selection mechanism uses the given Nessie client name or Nessie client builder implementation class name to select the client builder from the list of available implementations.

        If neither a name nor an implementation class are specified, aka both parameters are null, the Nessie client builder with the highest priority() will be returned.

        Either the name or the implementation class should be specified. Specifying both is discouraged.

        Parameters:
        clientName - the name of the Nessie client, as returned by name(), or null
        clientBuilderImpl - the class that implements the Nessie client builder, or null
        Returns:
        Nessie client builder for the requested name or implementation class.
        Throws:
        java.lang.IllegalArgumentException - if no Nessie client matching the requested name and/or implementation class could be found