-
- All Implemented Interfaces:
public interface TriggersProviderNotifies observers of the current state and subsequent changes to segments or query states.
-
-
Method Summary
Modifier and Type Method Description abstract TriggerActionquerySegments(Method<List<Integer>> callback)Notifies the specified callback when any segment changes occur. abstract TriggerActioncohorts(Method<List<String>> callback)Notifies the specified callback when any cohort changes occur. abstract TriggerActionqueryReactions(String reaction, Method<List<Integer>> callback)Notifies the specified callback when any segment changes occur for the specified reaction. abstract TriggerActioncohortActivations(String activationType, Method<List<String>> callback)Notifies the specified callback when any cohort updates occur for the specified activation type. abstract <T extends Any> TriggerActiontriggerAction(Integer queryId, Method<T> callback)Notifies the specified callback with the query state. abstract TriggerActiontriggerActionMap(Integer queryId, Method<Map<String, Object>> callback)Notifies the specified callback with the query state (when the state is a complex type). -
-
Method Detail
-
querySegments
@CheckResult()@Deprecated(message = "Deprecated, replace with the cohorts function to get support for all cohort types.", replaceWith = @ReplaceWith(imports = {}, expression = "cohorts(callback: Method<List<String>>)"), level = DeprecationLevel.WARNING) abstract TriggerAction querySegments(Method<List<Integer>> callback)
Notifies the specified callback when any segment changes occur.
- Parameters:
callback- The method to be called each time segment entry/exit has occurred.
-
cohorts
abstract TriggerAction cohorts(Method<List<String>> callback)
Notifies the specified callback when any cohort changes occur.
- Parameters:
callback- The method to be called each time cohort entry/exit has occurred.
-
queryReactions
@CheckResult()@Deprecated(message = "Deprecated, replace with the cohortsActivations function to get support for all cohort types.", replaceWith = @ReplaceWith(imports = {}, expression = "cohortActivations(activationType: String, callback: Method<List<String>>)"), level = DeprecationLevel.WARNING) abstract TriggerAction queryReactions(String reaction, Method<List<Integer>> callback)
Notifies the specified callback when any segment changes occur for the specified reaction.
- Parameters:
reaction- the name of the reaction type (e.g.callback- The method to be called each time segment entry/exit has occurred.
-
cohortActivations
@CheckResult() abstract TriggerAction cohortActivations(String activationType, Method<List<String>> callback)
Notifies the specified callback when any cohort updates occur for the specified activation type.
- Parameters:
activationType- the name of the activation type (e.g.callback- The method to be called each time a cohort update has occurred.
-
triggerAction
@CheckResult() abstract <T extends Any> TriggerAction triggerAction(Integer queryId, Method<T> callback)
Notifies the specified callback with the query state.
- Parameters:
callback- The method to be called each time the query state changes.
-
triggerActionMap
@CheckResult() abstract TriggerAction triggerActionMap(Integer queryId, Method<Map<String, Object>> callback)
Notifies the specified callback with the query state (when the state is a complex type).
- Parameters:
callback- The method to be called each time the query state changes.
-
-
-
-