public class ModuleRemoteConfig extends ModuleBase
| Modifier and Type | Class and Description |
|---|---|
class |
ModuleRemoteConfig.RemoteConfig |
static interface |
ModuleRemoteConfig.RemoteConfigCallback |
static class |
ModuleRemoteConfig.RemoteConfigValueStore |
| Modifier and Type | Field and Description |
|---|---|
protected CtxCore |
ctx |
protected boolean |
disabledModule |
protected InternalConfig |
internalConfig |
protected static Log.Module |
L |
protected java.util.Map<java.lang.Long,ModuleRemoteConfig.RemoteConfigCallback> |
requestCallbacks |
static java.lang.Long |
storableStorageId |
static java.lang.String |
storableStoragePrefix |
| Constructor and Description |
|---|
ModuleRemoteConfig() |
| Modifier and Type | Method and Description |
|---|---|
void |
disableModule() |
java.lang.Integer |
getFeature() |
protected java.lang.Object |
getRemoteConfigValue(java.lang.String key) |
ModuleRemoteConfig.RemoteConfigValueStore |
getStoredValues() |
void |
init(InternalConfig config)
All initialization must be done in this method, not constructor.
|
void |
onContextAcquired(CtxCore ctx)
SDK got a first context.
|
java.lang.Boolean |
onRequest(Request request)
This method is called only on owning module only if module marks request as owned (
Request.own(Class). |
void |
onRequestCompleted(Request request,
java.lang.String response,
int responseCode)
Called when the request is executed.
|
void |
saveStoredValues(ModuleRemoteConfig.RemoteConfigValueStore values) |
protected void |
updateRemoteConfigValues(java.lang.String[] keysOnly,
java.lang.String[] keysExcept,
ModuleRemoteConfig.RemoteConfigCallback callback)
Internal call for updating remote config keys
|
isActive, onActivityCreated, onActivityDestroyed, onActivityPaused, onActivityResumed, onActivitySaveInstanceState, onActivityStarted, onActivityStopped, onConfigurationChanged, onDeviceId, onLimitedContextAcquired, onSessionBegan, onSessionEnded, onUserChanged, stopprotected static final Log.Module L
public static final java.lang.Long storableStorageId
public static final java.lang.String storableStoragePrefix
protected InternalConfig internalConfig
protected CtxCore ctx
protected java.util.Map<java.lang.Long,ModuleRemoteConfig.RemoteConfigCallback> requestCallbacks
protected boolean disabledModule
public java.lang.Integer getFeature()
public void init(InternalConfig config)
Moduleinit in interface Moduleinit in class ModuleBaseconfig - Countly configuration object: can be stored locally if needed.public void onContextAcquired(CtxCore ctx)
ModuleApplication#onCreate())onContextAcquired in interface ModuleonContextAcquired in class ModuleBasectx - CtxCore with application instancepublic java.lang.Boolean onRequest(Request request)
ModuleRequest.own(Class).
Gives a module another chance to modify request before sending. Being run in CountlyService.onRequest in interface ModuleonRequest in class ModuleBaserequest - request to checktrue if ok to send now, false if not ok to (remove request
from queue), null if cannot decide yetpublic void disableModule()
public void onRequestCompleted(Request request, java.lang.String response, int responseCode)
ModuleonRequestCompleted in interface ModuleonRequestCompleted in class ModuleBaseprotected void updateRemoteConfigValues(java.lang.String[] keysOnly,
java.lang.String[] keysExcept,
ModuleRemoteConfig.RemoteConfigCallback callback)
keysOnly - set if these are the only keys to updatekeysExcept - set if these keys should be ignored from the updatecallback - called after the update is doneprotected java.lang.Object getRemoteConfigValue(java.lang.String key)
public ModuleRemoteConfig.RemoteConfigValueStore getStoredValues()
public void saveStoredValues(ModuleRemoteConfig.RemoteConfigValueStore values)