Class ConfigManager
-
- All Implemented Interfaces:
public final class ConfigManagerThis class is responsible for managing the Configs fetched from the UnifiedSdk. It fetches the configs from the DB and then fetches the expired configs from the Network. It also returns the default configs if the configs are not available.
-
-
Constructor Summary
Constructors Constructor Description ConfigManager(ConfigManagerState configManagerState, ConfigManagerDI configManagerDI)
-
Method Summary
Modifier and Type Method Description final Unitstart()final UnitonAccountIdChanged()Clears the config table when the account ID changes, so that new set of configs can be fetched from the Network. final <T extends Config> TgetConfig(Class<T> clazz)final UnitattachListener(String type, ConfigUpdateListener listener)Attaches a ConfigUpdateListener for the specified config type, if the cached config is Expired. final Unitclear()-
-
Constructor Detail
-
ConfigManager
ConfigManager(ConfigManagerState configManagerState, ConfigManagerDI configManagerDI)
-
-
Method Detail
-
onAccountIdChanged
final Unit onAccountIdChanged()
Clears the config table when the account ID changes, so that new set of configs can be fetched from the Network.
-
attachListener
final Unit attachListener(String type, ConfigUpdateListener listener)
Attaches a ConfigUpdateListener for the specified config type, if the cached config is Expired.
-
-
-
-