public interface RuleUnitExecutor
RuleUnit
s.Modifier and Type | Method and Description |
---|---|
RuleUnitExecutor |
bind(KieBase kiebase)
Bind this executor to a
KieBase in order to execute the units defined in it. |
RuleUnitExecutor |
bindVariable(String name,
Object value)
Binds a variable to this executor with a given name.
|
static RuleUnitExecutor |
create()
Creates a brand new RuleUnitExecutor
|
void |
dispose()
Releases all the current executor resources, setting up the session for garbage collection.
|
void |
halt()
Requests the executor to stop running units.
|
<T> DataSource<T> |
newDataSource(String name,
T... items)
Creates a DataSource, optionally containing some items, and bind it this executor with the given name.
|
int |
run(Class<? extends RuleUnit> ruleUnitClass)
Runs a RuleUnit of the given class.
|
int |
run(RuleUnit ruleUnit)
Runs a RuleUnit of the given class.
|
void |
runUntilHalt(Class<? extends RuleUnit> ruleUnitClass)
Runs until halt a RuleUnit of the given class.
|
void |
runUntilHalt(RuleUnit ruleUnit)
Runs until halt a RuleUnit of the given class.
|
RuleUnitExecutor bind(KieBase kiebase)
KieBase
in order to execute the units defined in it.int run(RuleUnit ruleUnit)
void runUntilHalt(Class<? extends RuleUnit> ruleUnitClass)
void runUntilHalt(RuleUnit ruleUnit)
void halt()
<T> DataSource<T> newDataSource(String name, T... items)
name
- the name with which the newly created DataSource will be bound to this executor.items
- the items contained in the DataSource.RuleUnitExecutor bindVariable(String name, Object value)
RuleUnit
s executed on this executor using a naming convention.name
- the name with which the value will be bound to this executor.value
- the value to bind.void dispose()
static RuleUnitExecutor create()
Copyright © 2001–2017 JBoss by Red Hat. All rights reserved.