Interface RuleListenerService


  • public interface RuleListenerService
    A service that gets called when a rule's conditions are evaluated or when a rule's actions are executed.
    • Method Detail

      • onEvaluate

        void onEvaluate​(Rule rule,
                        Event event)
        Called before a rule's conditions are evaluated. Be careful when implemented this listener because rule's condition are called in very high frequencies and the performance of this listener might have a huge impact on rule's performance
        Parameters:
        rule - the rule that is being evaluated
        event - the event we are processing and evaluating against the rule
      • onAlreadyRaised

        void onAlreadyRaised​(RuleListenerService.AlreadyRaisedFor alreadyRaisedFor,
                             Rule rule,
                             Event event)
        Called when a rule has already been raised either for a session or a profile.
        Parameters:
        alreadyRaisedFor - an enum that indicates if the rule was already raised once for the session or for the profile
        rule - the rule that has already been raised
        event - the event for which this rule has already been raised.
      • onExecuteActions

        void onExecuteActions​(Rule rule,
                              Event event)
        Called just before a matching rule's actions are about to be executed.
        Parameters:
        rule - the matching rule for the current event
        event - the event we are processing that matched the current rule.