Package com.inmobi.media.core.config
Object ConfigComponent
-
- All Implemented Interfaces:
public class ConfigComponent
-
-
Field Summary
Fields Modifier and Type Field Description public final static ConfigComponentINSTANCE
-
Method Summary
Modifier and Type Method Description final Unitstart()Starts the ConfigComponent, fetching configs from the database and network if necessary. final UnitonAccountIdChanged()Clears the config table when the account ID changes. final <T extends Config> TgetConfig()Retrieves the configuration of the specified type from the cache, or returns the default config if not present. final <T extends Config> TgetConfig(Class<T> clazz)Retrieves the configuration of the specified type from the cache, or returns the default config if not present. final UnitattachListener(String type, ConfigUpdateListener listener)Attaches a ConfigUpdateListener for the specified config type. final Unitclear()-
-
Method Detail
-
start
final Unit start()
Starts the ConfigComponent, fetching configs from the database and network if necessary.
-
onAccountIdChanged
final Unit onAccountIdChanged()
Clears the config table when the account ID changes.
-
getConfig
final <T extends Config> T getConfig()
Retrieves the configuration of the specified type from the cache, or returns the default config if not present.
-
getConfig
final <T extends Config> T getConfig(Class<T> clazz)
Retrieves the configuration of the specified type from the cache, or returns the default config if not present.
-
attachListener
final Unit attachListener(String type, ConfigUpdateListener listener)
Attaches a ConfigUpdateListener for the specified config type.
-
-
-
-