Interface ClientConfiguration.TerminalClientConfigurationBuilder
- All Known Subinterfaces:
- ClientConfiguration.MaybeSecureClientConfigurationBuilder
- Enclosing interface:
- ClientConfiguration
public static interface ClientConfiguration.TerminalClientConfigurationBuilder
- Since:
- 3.2
- Author:
- Christoph Strobl, Mark Paluch
- 
Method SummaryModifier and TypeMethodDescriptionbuild()Build theClientConfigurationobject.withBasicAuth(String username, String password) Configure the username and password to be sent as a Basic Authentication headerwithClientConfigurer(ClientConfiguration.ClientConfigurationCallback<?> clientConfigurer) Register aClientConfiguration.ClientConfigurationCallbackto configure the client.withConnectTimeout(long millis) Configure the milliseconds for the connect-timeout.withConnectTimeout(Duration timeout) Configure aDurationconnect timeout.withDefaultHeaders(HttpHeaders defaultHeaders) withHeaders(Supplier<HttpHeaders> headers) set a supplier for custom headers.withPathPrefix(String pathPrefix) Configure the path prefix that will be prepended to any HTTP(s) requestswithSocketTimeout(long millis) Configure the milliseconds for the socket timeout.withSocketTimeout(Duration timeout) Configure asocket timeoutwhich is typically applied as SO-timeout/read timeout.
- 
Method Details- 
withDefaultHeadersClientConfiguration.TerminalClientConfigurationBuilder withDefaultHeaders(HttpHeaders defaultHeaders) - Parameters:
- defaultHeaders- must not be null.
- Returns:
- the ClientConfiguration.TerminalClientConfigurationBuilder
 
- 
withConnectTimeoutConfigure the milliseconds for the connect-timeout.- Parameters:
- millis- the timeout to use.
- Returns:
- the ClientConfiguration.TerminalClientConfigurationBuilder
- See Also:
 
- 
withConnectTimeoutConfigure aDurationconnect timeout.- Parameters:
- timeout- the timeout to use. Must not be null.
- Returns:
- the ClientConfiguration.TerminalClientConfigurationBuilder
- See Also:
 
- 
withSocketTimeoutConfigure the milliseconds for the socket timeout.- Parameters:
- millis- the timeout to use.
- Returns:
- the ClientConfiguration.TerminalClientConfigurationBuilder
- See Also:
 
- 
withSocketTimeoutConfigure asocket timeoutwhich is typically applied as SO-timeout/read timeout.- Parameters:
- timeout- the timeout to use. Must not be null.
- Returns:
- the ClientConfiguration.TerminalClientConfigurationBuilder
- See Also:
 
- 
withBasicAuthClientConfiguration.TerminalClientConfigurationBuilder withBasicAuth(String username, String password) Configure the username and password to be sent as a Basic Authentication header- Parameters:
- username- the username. Must not be null.
- password- the password. Must not be null.
- Returns:
- the ClientConfiguration.TerminalClientConfigurationBuilder
 
- 
withPathPrefixConfigure the path prefix that will be prepended to any HTTP(s) requests- Parameters:
- pathPrefix- the pathPrefix.
- Returns:
- the ClientConfiguration.TerminalClientConfigurationBuilder
- Since:
- 4.0
 
- 
withProxy- Parameters:
- proxy- a proxy formatted as String host:port.
- Returns:
- the ClientConfiguration.TerminalClientConfigurationBuilder.
 
- 
withClientConfigurerClientConfiguration.TerminalClientConfigurationBuilder withClientConfigurer(ClientConfiguration.ClientConfigurationCallback<?> clientConfigurer) Register aClientConfiguration.ClientConfigurationCallbackto configure the client.- Parameters:
- clientConfigurer- configuration callback, must not be null.
- Returns:
- the ClientConfiguration.TerminalClientConfigurationBuilder.
- Since:
- 4.3
 
- 
withHeadersset a supplier for custom headers. This is invoked for every HTTP request to Elasticsearch to retrieve headers that should be sent with the request. A common use case is passing in authentication headers that may change.
 Note: When used in a reactive environment, the calling ofSupplier.get()function must not do any blocking operations. It may return null.- Parameters:
- headers- supplier function for headers, must not be null
- Returns:
- the ClientConfiguration.TerminalClientConfigurationBuilder.
- Since:
- 4.0
 
- 
buildClientConfiguration build()Build theClientConfigurationobject.- Returns:
- the ClientConfigurationobject.
 
 
-