Package 

Class ConfigCatClient.Options

    • Method Summary

      Modifier and Type Method Description
      void httpClient(OkHttpClient httpClient) Sets the underlying http client which will be used to fetch the latest configuration.
      void cache(ConfigCache cache) Sets the internal cache implementation.
      void baseUrl(String baseUrl) Sets the base ConfigCat CDN url.
      void pollingMode(PollingMode pollingMode) Sets the internal refresh policy implementation.
      void dataGovernance(DataGovernance dataGovernance) Default: Global.
      void logLevel(LogLevel logLevel) Default: Warning.
      void flagOverrides(OverrideDataSource overrideDataSource, OverrideBehaviour behaviour) Sets feature flag and setting overrides.
      void defaultUser(User user) The default user, used as fallback when there's no user parameter is passed to the getValue() method.
      void offline(boolean isOffline) Indicates whether the SDK should be initialized in offline mode or not.
      ConfigCatHooks hooks() Hooks for events sent by ConfigCatClient.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.