public static class ConfigCatClient.Builder
extends java.lang.Object
ConfigCatClient instance.| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
ConfigCatClient.Builder |
baseUrl(java.lang.String baseUrl)
Sets the base ConfigCat CDN url.
|
ConfigCatClient |
build(java.lang.String sdkKey)
Builds the configured
ConfigCatClient instance. |
ConfigCatClient.Builder |
cache(ConfigCache cache)
Sets the internal cache implementation.
|
ConfigCatClient.Builder |
dataGovernance(DataGovernance dataGovernance)
Default: Global.
|
ConfigCatClient.Builder |
flagOverrides(OverrideDataSourceBuilder dataSourceBuilder,
OverrideBehaviour behaviour)
Sets feature flag and setting overrides.
|
ConfigCatClient.Builder |
httpClient(okhttp3.OkHttpClient httpClient)
Sets the underlying http client which will be used to fetch the latest configuration.
|
ConfigCatClient.Builder |
logLevel(LogLevel logLevel)
Default: Warning.
|
ConfigCatClient.Builder |
mode(PollingMode pollingMode)
Sets the internal refresh policy implementation.
|
public ConfigCatClient.Builder httpClient(okhttp3.OkHttpClient httpClient)
httpClient - the http client.public ConfigCatClient.Builder cache(ConfigCache cache)
cache - a ConfigCache implementation used to cache the configuration.public ConfigCatClient.Builder baseUrl(java.lang.String baseUrl)
baseUrl - the base ConfigCat CDN url.public ConfigCatClient.Builder mode(PollingMode pollingMode)
pollingMode - the polling mode.public ConfigCatClient.Builder dataGovernance(DataGovernance dataGovernance)
dataGovernance - the DataGovernance parameter.public ConfigCatClient.Builder logLevel(LogLevel logLevel)
logLevel - the LogLevel parameter.public ConfigCatClient.Builder flagOverrides(OverrideDataSourceBuilder dataSourceBuilder, OverrideBehaviour behaviour)
dataSourceBuilder - builder that describes the overrides' data source.behaviour - the override behaviour. It can be used to set preference on whether the local values should
override the remote values, or use local values only when a remote value doesn't exist,
or use it for local only mode.java.lang.IllegalArgumentException - when the dataSourceBuilder or behaviour parameter is null.public ConfigCatClient build(java.lang.String sdkKey)
ConfigCatClient instance.sdkKey - the project token.ConfigCatClient instance.