public abstract class Rule extends Object implements Runnable
eval()
and
- if true - the action is triggered with trigger()
.Modifier and Type | Field and Description |
---|---|
protected Log |
log |
protected SUPERVISOR |
sv |
Constructor and Description |
---|
Rule() |
Modifier and Type | Method and Description |
---|---|
abstract String |
condition()
Returns a description of the condition that led to
eval() returning true |
abstract 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 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 String name()
public abstract String description()
public void init()
public void destroy()
public abstract boolean eval()
condition()
should return a non-null stringpublic abstract String condition()
eval()
returning truepublic abstract void trigger() throws Throwable
eval()
returned trueThrowable
Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.