Package 

Class ConfigCatHooks

    • Method Detail

      • addOnClientReady

         void addOnClientReady(Runnable callback)

        Subscribes to the onReady event. This event is fired when the SDK reaches the ready state.If the SDK is configured with lazy load or manual polling it's considered ready right after instantiation.In case of auto polling, the ready state is reached when the SDK has a valid config.json loadedinto memory either from cache or from HTTP. If the config couldn't be loaded neither from cache nor from HTTP theonReady event fires when the auto polling's maxInitWaitTimeInSeconds is reached.

        Parameters:
        callback - the method to call when the event fires.
      • addOnConfigChanged

         void addOnConfigChanged(Consumer<Map<String, Setting>> callback)

        Subscribes to the onConfigChanged event. This event is fired when the SDK loads a valid config.jsoninto memory from cache, and each subsequent time when the loaded config.json changes via HTTP.

        Parameters:
        callback - the method to call when the event fires.
      • addOnError

         void addOnError(Consumer<String> callback)

        Subscribes to the onError event. This event is fired when an error occurs within the ConfigCat SDK.

        Parameters:
        callback - the method to call when the event fires.
      • addOnFlagEvaluated

         void addOnFlagEvaluated(Consumer<EvaluationDetails<Object>> callback)

        Subscribes to the onFlagEvaluated event. This event is fired each time when the SDK evaluates a feature flag or setting.The event sends the same evaluation details that you would get from getValueDetails().

        Parameters:
        callback - the method to call when the event fires.