public interface ClientConfiguration
| Modifier and Type | Interface and Description |
|---|---|
static interface |
ClientConfiguration.ClientConfigurationBuilderWithRequiredEndpoint |
static interface |
ClientConfiguration.MaybeSecureClientConfigurationBuilder |
static interface |
ClientConfiguration.TerminalClientConfigurationBuilder |
| Modifier and Type | Method and Description |
|---|---|
static ClientConfiguration.ClientConfigurationBuilderWithRequiredEndpoint |
builder()
Creates a new
ClientConfigurationBuilder instance. |
static ClientConfiguration |
create(InetSocketAddress socketAddress)
Creates a new
ClientConfiguration instance configured to a single host given InetSocketAddress. |
static ClientConfiguration |
create(String hostAndPort)
Creates a new
ClientConfiguration instance configured to a single host given hostAndPort. |
Duration |
getConnectTimeout()
Returns the
connect timeout. |
HttpHeaders |
getDefaultHeaders()
Obtain the
HttpHeaders to be used by default. |
List<InetSocketAddress> |
getEndpoints()
Returns the configured endpoints.
|
Supplier<HttpHeaders> |
getHeadersSupplier() |
Optional<HostnameVerifier> |
getHostNameVerifier()
Returns the
HostnameVerifier to use. |
String |
getPathPrefix()
Returns the path prefix that should be prepended to HTTP(s) requests for Elasticsearch behind a proxy.
|
Optional<String> |
getProxy()
returns an optionally set proxy in the form host:port
|
Duration |
getSocketTimeout()
Returns the
socket timeout which is typically applied as SO-timeout/read timeout. |
Optional<SSLContext> |
getSslContext()
Returns the
SSLContext to use. |
Function<WebClient,WebClient> |
getWebClientConfigurer() |
static ClientConfiguration |
localhost()
Creates a new
ClientConfiguration instance configured to localhost. |
boolean |
useSsl()
Returns true when the client should use SSL.
|
static ClientConfiguration.ClientConfigurationBuilderWithRequiredEndpoint builder()
ClientConfigurationBuilder instance.ClientConfigurationBuilder instance.static ClientConfiguration localhost()
ClientConfiguration instance configured to localhost.
// "localhost:9200" ClientConfiguration configuration = ClientConfiguration.localhost();
ClientConfiguration instanceClientConfiguration.ClientConfigurationBuilderWithRequiredEndpoint.connectedToLocalhost()static ClientConfiguration create(String hostAndPort)
ClientConfiguration instance configured to a single host given hostAndPort.
For example given the endpoint http://localhost:9200
ClientConfiguration configuration = ClientConfiguration.create("localhost:9200");
ClientConfigurationBuilder instance.static ClientConfiguration create(InetSocketAddress socketAddress)
ClientConfiguration instance configured to a single host given InetSocketAddress.
For example given the endpoint http://localhost:9200
ClientConfiguration configuration = ClientConfiguration
.create(InetSocketAddress.createUnresolved("localhost", 9200));
ClientConfigurationBuilder instance.List<InetSocketAddress> getEndpoints()
HttpHeaders getDefaultHeaders()
HttpHeaders to be used by default.HttpHeaders to be used by default.boolean useSsl()
Optional<SSLContext> getSslContext()
SSLContext to use. Can be Optional.empty() if unconfigured.SSLContext to use. Can be Optional.empty() if unconfigured.Optional<HostnameVerifier> getHostNameVerifier()
HostnameVerifier to use. Can be Optional.empty() if unconfigured.HostnameVerifier to use. Can be Optional.empty() if unconfigured.Duration getConnectTimeout()
connect timeout.Socket.connect(SocketAddress, int),
ChannelOption.CONNECT_TIMEOUT_MILLISDuration getSocketTimeout()
socket timeout which is typically applied as SO-timeout/read timeout.Socket.setSoTimeout(int),
ReadTimeoutHandler,
WriteTimeoutHandler@Nullable String getPathPrefix()
Optional<String> getProxy()
Function<WebClient,WebClient> getWebClientConfigurer()
Supplier<HttpHeaders> getHeadersSupplier()
Copyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.