Package org.apache.unomi.api.services
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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
RuleListenerService.AlreadyRaisedFor
This enum indicates which type of already raised event we are dealing with
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
onAlreadyRaised(RuleListenerService.AlreadyRaisedFor alreadyRaisedFor, Rule rule, Event event)
Called when a rule has already been raised either for a session or a profile.void
onEvaluate(Rule rule, Event event)
Called before a rule's conditions are evaluated.void
onExecuteActions(Rule rule, Event event)
Called just before a matching rule's actions are about to be 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 evaluatedevent
- 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 profilerule
- the rule that has already been raisedevent
- the event for which this rule has already been raised.
-
-