Class LaunchRulesEngine
-
- All Implemented Interfaces:
public class LaunchRulesEngine
-
-
Constructor Summary
Constructors Constructor Description LaunchRulesEngine(String name, ExtensionApi extensionApi)
-
Method Summary
Modifier and Type Method Description voidreplaceRules(List<LaunchRule> rules)Set a new set of rules, the new rules replace the current rules. voidaddRules(List<LaunchRule> rules)Adds a new set of rules, the new rules are added to the current rules. EventprocessEvent(@NonNull() Event event)Processes the supplied event with all the rules that match it. List<RuleConsequence>evaluateEvent(@NonNull() Event event)Evaluates the supplied event against the all current rules and returns the 's from the rules that matched the supplied event. -
-
Constructor Detail
-
LaunchRulesEngine
LaunchRulesEngine(String name, ExtensionApi extensionApi)
-
-
Method Detail
-
replaceRules
void replaceRules(List<LaunchRule> rules)
Set a new set of rules, the new rules replace the current rules.
- Parameters:
rules- a list of LaunchRules
-
addRules
void addRules(List<LaunchRule> rules)
Adds a new set of rules, the new rules are added to the current rules.
- Parameters:
rules- a list of LaunchRules
-
processEvent
Event processEvent(@NonNull() Event event)
Processes the supplied event with all the rules that match it. This processing may result in dispatch of the supplied event after attachment, modification of its data or dispatch of a new event from the supplied event.
- Parameters:
event- the event to be evaluated- Returns:
the processed [Event] after token replacement.
-
evaluateEvent
List<RuleConsequence> evaluateEvent(@NonNull() Event event)
Evaluates the supplied event against the all current rules and returns the 's from the rules that matched the supplied event.
- Parameters:
event- the event to be evaluated- Returns:
a
List<RuleConsequence>that match the supplied event.
-
-
-
-