-
public class ConfigCatClient.OptionsConfiguration options for a ConfigCatClient instance.
-
-
Method Summary
Modifier and Type Method Description voidhttpClient(OkHttpClient httpClient)Sets the underlying http client which will be used to fetch the latest configuration. voidcache(ConfigCache cache)Sets the internal cache implementation. voidbaseUrl(String baseUrl)Sets the base ConfigCat CDN url. voidpollingMode(PollingMode pollingMode)Sets the internal refresh policy implementation. voiddataGovernance(DataGovernance dataGovernance)Default: Global. voidlogLevel(LogLevel logLevel)Default: Warning. voidflagOverrides(OverrideDataSource overrideDataSource, OverrideBehaviour behaviour)Sets feature flag and setting overrides. voiddefaultUser(User user)The default user, used as fallback when there's no user parameter is passed to the getValue() method. voidoffline(boolean isOffline)Indicates whether the SDK should be initialized in offline mode or not. ConfigCatHookshooks()Hooks for events sent by ConfigCatClient. -
-
Method Detail
-
httpClient
void httpClient(OkHttpClient httpClient)
Sets the underlying http client which will be used to fetch the latest configuration.
- Parameters:
httpClient- the http client.
-
cache
void cache(ConfigCache cache)
Sets the internal cache implementation.
- Parameters:
cache- a ConfigCache implementation used to cache the configuration.
-
baseUrl
void baseUrl(String baseUrl)
Sets the base ConfigCat CDN url.
- Parameters:
baseUrl- the base ConfigCat CDN url.
-
pollingMode
void pollingMode(PollingMode pollingMode)
Sets the internal refresh policy implementation.
- Parameters:
pollingMode- the polling mode.
-
dataGovernance
void dataGovernance(DataGovernance dataGovernance)
Default: Global. Set this parameter to be in sync with the Data Governance preference on the Dashboard:https://app.configcat.com/organization/data-governance (Only Organization Admins have access)
- Parameters:
dataGovernance- the DataGovernance parameter.
-
logLevel
void logLevel(LogLevel logLevel)
Default: Warning. Sets the internal log level.
- Parameters:
logLevel- the LogLevel parameter.
-
flagOverrides
void flagOverrides(OverrideDataSource overrideDataSource, OverrideBehaviour behaviour)
Sets feature flag and setting overrides.
- Parameters:
overrideDataSource- the feature flag and setting overrides' data source.behaviour- the override behaviour.
-
defaultUser
void defaultUser(User user)
The default user, used as fallback when there's no user parameter is passed to the getValue() method.
- Parameters:
user- the default user.
-
offline
void offline(boolean isOffline)
Indicates whether the SDK should be initialized in offline mode or not.
- Parameters:
isOffline- true when the SDK should be initialized in offline mode, otherwise false.
-
hooks
ConfigCatHooks hooks()
Hooks for events sent by ConfigCatClient.
-
-
-
-