|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jgroups.protocols.rules.Rule
public abstract class Rule
A rule with a condition and (optional) action. When a rule is run, the condition is checked with eval() and
- if true - the action is triggered with trigger().
| Field Summary | |
|---|---|
protected Log |
log
|
protected SUPERVISOR |
sv
|
| Constructor Summary | |
|---|---|
Rule()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SUPERVISOR sv
protected Log log
| Constructor Detail |
|---|
public Rule()
| Method Detail |
|---|
public Rule supervisor(SUPERVISOR sv)
public Rule log(Log log)
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 string
public abstract java.lang.String condition()
eval() returning true
public abstract void trigger()
throws java.lang.Throwable
eval() returned true
java.lang.Throwablepublic void run()
run in interface java.lang.Runnable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||