-
- All Implemented Interfaces:
-
com.clevertap.android.sdk.FailureFlushListener
public class EventQueueManager extends BaseEventQueueManager implements FailureFlushListener
-
-
Constructor Summary
Constructors Constructor Description EventQueueManager(BaseDatabaseManager baseDatabaseManager, Context context, CleverTapInstanceConfig config, EventMediator eventMediator, SessionManager sessionManager, BaseCallbackManager callbackManager, MainLooperHandler mainLooperHandler, DeviceInfo deviceInfo, ValidationResultStack validationResultStack, NetworkManager networkManager, CoreMetaData coreMetaData, CTLockManager ctLockManager, LocalDataStore localDataStore, ControllerManager controllerManager, LoginInfoProvider loginInfoProvider)
-
Method Summary
Modifier and Type Method Description voidaddToQueue(Context context, JSONObject event, int eventType)voidfailureFlush(Context context)voidflush()voidflushQueueAsync(Context context, EventGroup eventGroup)voidflushQueueSync(Context context, EventGroup eventGroup)Flushes the events queue synchronously with a default null value for the caller. voidflushQueueSync(Context context, EventGroup eventGroup, @Nullable() String caller)Flushes the events queue synchronously, checking network connectivity, offline mode, and performing handshake if necessary. voidflushQueueSync(Context context, EventGroup eventGroup, String caller, boolean isUserSwitchFlush)voidsendImmediately(Context context, EventGroup eventGroup, JSONObject eventData)This method is currently used only for syncing of variables. intgetNow()voidprocessEvent(Context context, JSONObject event, int eventType)voidinitInAppEvaluation(Context context, JSONObject event, int eventType)voidprocessPushNotificationViewedEvent(Context context, JSONObject event, int eventType)voidpushBasicProfile(JSONObject baseProfile, boolean removeFromSharedPrefs)voidpushInitialEventsAsync()Future<out Object>queueEvent(Context context, JSONObject event, int eventType)Adds a new event to the queue, to be sent later. voidscheduleQueueFlush(Context context)-
-
Constructor Detail
-
EventQueueManager
EventQueueManager(BaseDatabaseManager baseDatabaseManager, Context context, CleverTapInstanceConfig config, EventMediator eventMediator, SessionManager sessionManager, BaseCallbackManager callbackManager, MainLooperHandler mainLooperHandler, DeviceInfo deviceInfo, ValidationResultStack validationResultStack, NetworkManager networkManager, CoreMetaData coreMetaData, CTLockManager ctLockManager, LocalDataStore localDataStore, ControllerManager controllerManager, LoginInfoProvider loginInfoProvider)
-
-
Method Detail
-
addToQueue
void addToQueue(Context context, JSONObject event, int eventType)
-
failureFlush
void failureFlush(Context context)
-
flush
void flush()
-
flushQueueAsync
void flushQueueAsync(Context context, EventGroup eventGroup)
-
flushQueueSync
void flushQueueSync(Context context, EventGroup eventGroup)
Flushes the events queue synchronously with a default null value for the caller.This is an overloaded method that internally calls flushQueueSync.
- Parameters:
context- The Context object.eventGroup- The EventGroup for which the queue needs to be flushed.
-
flushQueueSync
void flushQueueSync(Context context, EventGroup eventGroup, @Nullable() String caller)
Flushes the events queue synchronously, checking network connectivity, offline mode, and performing handshake if necessary.
- Parameters:
context- The Context object.eventGroup- The EventGroup for which the queue needs to be flushed.caller- The optional caller identifier.
-
flushQueueSync
void flushQueueSync(Context context, EventGroup eventGroup, String caller, boolean isUserSwitchFlush)
-
sendImmediately
void sendImmediately(Context context, EventGroup eventGroup, JSONObject eventData)
This method is currently used only for syncing of variables. If you find it appropriate youcan add handling of network error similar to flushQueueSync, also check return value ofsendQueue for success.
-
getNow
int getNow()
-
processEvent
void processEvent(Context context, JSONObject event, int eventType)
-
initInAppEvaluation
void initInAppEvaluation(Context context, JSONObject event, int eventType)
-
processPushNotificationViewedEvent
void processPushNotificationViewedEvent(Context context, JSONObject event, int eventType)
-
pushBasicProfile
void pushBasicProfile(JSONObject baseProfile, boolean removeFromSharedPrefs)
-
pushInitialEventsAsync
void pushInitialEventsAsync()
-
queueEvent
Future<out Object> queueEvent(Context context, JSONObject event, int eventType)
Adds a new event to the queue, to be sent later.
- Parameters:
context- The Android contextevent- The event to be queuedeventType- The type of event to be queued
-
scheduleQueueFlush
void scheduleQueueFlush(Context context)
-
-
-
-