public abstract class Rule
extends java.lang.Object
implements java.lang.Runnable
eval()
and
- if true - the action is triggered with trigger()
.限定符和类型 | 字段和说明 |
---|---|
protected Log |
log |
protected SUPERVISOR |
sv |
构造器和说明 |
---|
Rule() |
限定符和类型 | 方法和说明 |
---|---|
abstract java.lang.String |
condition()
Returns a description of the condition that led to
eval() returning true |
abstract java.lang.String |
description()
Describes what the rules does
|
void |
destroy()
Called when rule is uninstalled
|
abstract boolean |
eval()
Evaluates the condition.
|
void |
init()
Called when rule is installed
|
Rule |
log(Log log) |
abstract java.lang.String |
name()
Returns the name of the rule.
|
void |
run() |
Rule |
supervisor(SUPERVISOR sv) |
abstract void |
trigger()
The action of the rule.
|
protected SUPERVISOR sv
protected Log log
public Rule supervisor(SUPERVISOR sv)
public abstract java.lang.String name()
public abstract java.lang.String description()
public void init()
public void destroy()
public abstract boolean eval()
condition()
should return a non-null stringpublic abstract java.lang.String condition()
eval()
returning truepublic abstract void trigger() throws java.lang.Throwable
eval()
returned truejava.lang.Throwable
public void run()
run
在接口中 java.lang.Runnable