Package org.projectnessie.client.http
Interface NessieHttpClientBuilder
- All Superinterfaces:
NessieClientBuilder
- All Known Implementing Classes:
NessieHttpClientBuilder.AbstractNessieHttpClientBuilder,NessieHttpClientBuilderImpl
HTTP specific Nessie client builder interface.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classConvenience base class for implementations ofNessieHttpClientBuilder.Nested classes/interfaces inherited from interface org.projectnessie.client.NessieClientBuilder
NessieClientBuilder.AbstractNessieClientBuilder -
Method Summary
Modifier and TypeMethodDescriptionaddRequestFilter(RequestFilter filter) Add a request filter to the client.addResponseFilter(ResponseFilter filter) Add a response filter to the client.fromConfig(Function<String, String> configuration) Configure this HttpClientBuilder instance using a configuration object and standard Nessie configuration keys defined by the constants defined inNessieConfigConstants.withApiCompatibilityCheck(boolean enable) withAuthentication(NessieAuthentication authentication) Sets theNessieAuthenticationinstance to be used.withAuthenticationFromConfig(Function<String, String> configuration) Configure only authentication in this HttpClientBuilder instance using a configuration object and standard Nessie configuration keys defined by the constants defined inNessieConfigConstants.withClientName(String clientName) withConnectionTimeout(int connectionTimeoutMillis) Sets the connect-timeout in milliseconds for remote requests.withDisableCompression(boolean disableCompression) Disables compression for remote requests.withFollowRedirects(String redirects) Whether HTTP redirects are followed, default is to not follow redirects.withForceUrlConnectionClient(boolean forceUrlConnectionClient) Deprecated.withHttp2Upgrade(boolean http2Upgrade) Whether to allow HTTP/2 upgrade, default isfalse.withReadTimeout(int readTimeoutMillis) Sets the read-timeout in milliseconds for remote requests.withResponseFactory(HttpResponseFactory responseFactory) withSSLContext(SSLContext sslContext) Optionally configure a specificSSLContext, currently only the Java 11+ accepts this option.withSSLParameters(SSLParameters sslParameters) Optionally configure specificSSLParameters.withTracing(boolean tracing) Convenience method forNessieClientBuilder.withUri(URI)taking a string.Set the Nessie server URI.Methods inherited from interface org.projectnessie.client.NessieClientBuilder
asInstanceOf, build, fromSystemProperties, name, names, priority, withCancellationFuture, withSSLCertificateVerificationDisabled
-
Method Details
-
withHttp2Upgrade
Whether to allow HTTP/2 upgrade, default isfalse.Only valid on Java 11 and newer with Java's new HTTP client.
-
withFollowRedirects
Whether HTTP redirects are followed, default is to not follow redirects.Valid values are the enum names of
HttpClient.Redirect.Only valid on Java 11 and newer with Java's new HTTP client.
-
withForceUrlConnectionClient
@Deprecated @CanIgnoreReturnValue NessieHttpClientBuilder withForceUrlConnectionClient(boolean forceUrlConnectionClient) Deprecated.usewithClientName(String)with the nameURLConnectioninstead.Whether to force using theURLConnectionbased client. -
withClientName
-
withResponseFactory
@CanIgnoreReturnValue NessieHttpClientBuilder withResponseFactory(HttpResponseFactory responseFactory) -
addRequestFilter
Add a request filter to the client. Enables low-level access to the request/response processing. -
addResponseFilter
Add a response filter to the client. Enables low-level access to the request/response processing. -
fromConfig
Description copied from interface:NessieClientBuilderConfigure this HttpClientBuilder instance using a configuration object and standard Nessie configuration keys defined by the constants defined inNessieConfigConstants. Non-nullvalues returned by theconfiguration-function will override previously configured values.Calls
NessieClientBuilder.withAuthenticationFromConfig(Function).- Specified by:
fromConfigin interfaceNessieClientBuilder- Parameters:
configuration- The function that returns a configuration value for a configuration key.- Returns:
this- See Also:
-
withApiCompatibilityCheck
- Specified by:
withApiCompatibilityCheckin interfaceNessieClientBuilder
-
withAuthenticationFromConfig
@CanIgnoreReturnValue NessieHttpClientBuilder withAuthenticationFromConfig(Function<String, String> configuration) Description copied from interface:NessieClientBuilderConfigure only authentication in this HttpClientBuilder instance using a configuration object and standard Nessie configuration keys defined by the constants defined inNessieConfigConstants.- Specified by:
withAuthenticationFromConfigin interfaceNessieClientBuilder- Parameters:
configuration- The function that returns a configuration value for a configuration key.- Returns:
this- See Also:
-
withAuthentication
@CanIgnoreReturnValue NessieHttpClientBuilder withAuthentication(NessieAuthentication authentication) Description copied from interface:NessieClientBuilderSets theNessieAuthenticationinstance to be used.- Specified by:
withAuthenticationin interfaceNessieClientBuilder- Parameters:
authentication- authentication for this client- Returns:
this
-
withTracing
- Specified by:
withTracingin interfaceNessieClientBuilder
-
withUri
Description copied from interface:NessieClientBuilderSet the Nessie server URI. A server URI must be configured.- Specified by:
withUriin interfaceNessieClientBuilder- Parameters:
uri- server URI- Returns:
this
-
withUri
Description copied from interface:NessieClientBuilderConvenience method forNessieClientBuilder.withUri(URI)taking a string.- Specified by:
withUriin interfaceNessieClientBuilder- Parameters:
uri- server URI- Returns:
this
-
withReadTimeout
Description copied from interface:NessieClientBuilderSets the read-timeout in milliseconds for remote requests.- Specified by:
withReadTimeoutin interfaceNessieClientBuilder
-
withConnectionTimeout
Description copied from interface:NessieClientBuilderSets the connect-timeout in milliseconds for remote requests.- Specified by:
withConnectionTimeoutin interfaceNessieClientBuilder
-
withDisableCompression
Description copied from interface:NessieClientBuilderDisables compression for remote requests.- Specified by:
withDisableCompressionin interfaceNessieClientBuilder
-
withSSLContext
Description copied from interface:NessieClientBuilderOptionally configure a specificSSLContext, currently only the Java 11+ accepts this option.- Specified by:
withSSLContextin interfaceNessieClientBuilder
-
withSSLParameters
Description copied from interface:NessieClientBuilderOptionally configure specificSSLParameters.- Specified by:
withSSLParametersin interfaceNessieClientBuilder
-
withClientName(String)with the nameURLConnectioninstead.