public static class ConfigCatClient.Options
extends java.lang.Object
ConfigCatClient instance.| Constructor and Description |
|---|
Options() |
| Modifier and Type | Method and Description |
|---|---|
void |
baseUrl(java.lang.String baseUrl)
Sets the base ConfigCat CDN url.
|
void |
cache(ConfigCache cache)
Sets the internal cache implementation.
|
void |
dataGovernance(DataGovernance dataGovernance)
Default: Global.
|
void |
defaultUser(User defaultUser)
Sets the default user.
|
void |
flagOverrides(OverrideDataSourceBuilder dataSourceBuilder,
OverrideBehaviour behaviour)
Sets feature flag and setting overrides.
|
ConfigCatHooks |
hooks()
Set the client hooks.
|
void |
httpClient(okhttp3.OkHttpClient httpClient)
Sets the underlying http client which will be used to fetch the latest configuration.
|
void |
logLevel(LogLevel logLevel)
Default: Warning.
|
void |
offline(boolean offline)
Set client offline mode.
|
void |
pollingMode(PollingMode pollingMode)
Sets the internal refresh policy implementation.
|
public void httpClient(okhttp3.OkHttpClient httpClient)
httpClient - the http client.public void cache(ConfigCache cache)
cache - a ConfigCache implementation used to cache the configuration.public void baseUrl(java.lang.String baseUrl)
baseUrl - the base ConfigCat CDN url.public void pollingMode(PollingMode pollingMode)
pollingMode - the polling mode.public void dataGovernance(DataGovernance dataGovernance)
dataGovernance - the DataGovernance parameter.public void logLevel(LogLevel logLevel)
logLevel - the LogLevel parameter.public void 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 void defaultUser(User defaultUser)
defaultUser - the default user.public void offline(boolean offline)
offline - the client offline mode value.public ConfigCatHooks hooks()