|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object i3.dragos.core.services.rules.Rule
public class Rule
Rules specify actions that are executed whenever a certain pattern is matched. Their main application is automated graph rewriting.
For much more information about RuleEngine and associated classes, please refer to the "Guide to Events and Rules" in the documentation.
Field Summary | |
---|---|
protected EventFilter |
pattern
The pattern an event must match so that the rule is executed. |
Constructor Summary | |
---|---|
Rule(java.lang.String name,
RuleAction action,
EventFilter pattern)
Creates a new rule. |
Method Summary | |
---|---|
RuleAction |
getAction()
Returns the action of the rule. |
java.lang.String |
getName()
Returns the name of the rule. |
EventFilter |
getPattern()
Returns the event pattern of the rule. |
boolean |
isEnabled()
Returns true if the rule is enabled and false
otherwise. |
void |
setEnabled(boolean enabled)
Enables or disables the rule. |
java.lang.String |
toString()
Returns a stringified representation of the rule. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final EventFilter pattern
Constructor Detail |
---|
public Rule(java.lang.String name, RuleAction action, EventFilter pattern)
name
- The rule's name.action
- The action that is activated when the rule is triggered.pattern
- The event pattern which activates the rule.Method Detail |
---|
public java.lang.String getName()
public EventFilter getPattern()
public RuleAction getAction()
public void setEnabled(boolean enabled)
enabled
- Determines whether the rule is enabled or not.public boolean isEnabled()
true
if the rule is enabled and false
otherwise.
true
if the rule is enabled, false
otherwise.public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |