public abstract class Rule
extends java.lang.Object
implements java.lang.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 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
in interface java.lang.Runnable
Copyright © 1998-2020 Red Hat. All Rights Reserved.