org.drools.jsr94.rules
Class StatelessRuleSessionImpl
java.lang.Object
org.drools.jsr94.rules.AbstractRuleSessionImpl
org.drools.jsr94.rules.StatelessRuleSessionImpl
- All Implemented Interfaces:
- RuleSession, StatelessRuleSession
public class StatelessRuleSessionImpl
- extends AbstractRuleSessionImpl
- implements StatelessRuleSession
The Drools implementation of the StatelessRuleSession
interface
which is a representation of a stateless rules engine session. A stateless
rules engine session exposes a stateless rule execution API to an underlying
rules engine.
- Author:
- thomas diesler
- See Also:
StatelessRuleSession
Method Summary |
List |
executeRules(List objects)
Executes the rules in the bound rule execution set using the supplied
list of objects. |
List |
executeRules(List objects,
ObjectFilter filter)
Executes the rules in the bound rule execution set using the supplied
list of objects. |
Methods inherited from class org.drools.jsr94.rules.AbstractRuleSessionImpl |
applyFilter, checkRuleSessionValidity, getProperties, getRuleExecutionSet, getRuleExecutionSetMetadata, getType, getWorkingMemory, initWorkingMemory, newWorkingMemory, release, reset, setProperties, setRuleExecutionSet, setWorkingMemory |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StatelessRuleSessionImpl
StatelessRuleSessionImpl(String bindUri,
Map properties)
throws RuleExecutionSetNotFoundException
- Gets the
RuleExecutionSet
for this URI and associates it
with a RuleBase.
- Parameters:
bindUri
- the URI the RuleExecutionSet
has been bound
toproperties
- additional properties used to create the
RuleSession
implementation.
- Throws:
RuleExecutionSetNotFoundException
- if there is no rule set under
the given URI
executeRules
public List executeRules(List objects)
throws InvalidRuleSessionException
- Executes the rules in the bound rule execution set using the supplied
list of objects. A
List
is returned containing the objects
created by (or passed into the rule session) the executed rules that
pass the filter test of the default RuleExecutionSet
ObjectFilter
(if present).
The returned list may not neccessarily include all objects passed, and
may include Object
s created by side-effects. The execution
of a RuleExecutionSet
can add, remove and update objects.
Therefore the returned object list is dependent on the rules that are
part of the executed RuleExecutionSet
as well as Drools
specific rule engine behavior.
- Specified by:
executeRules
in interface StatelessRuleSession
- Parameters:
objects
- the objects used to execute rules.
- Returns:
- a
List
containing the objects
as a result of executing the rules.
- Throws:
InvalidRuleSessionException
- on illegal rule session state.
executeRules
public List executeRules(List objects,
ObjectFilter filter)
throws InvalidRuleSessionException
- Executes the rules in the bound rule execution set using the supplied
list of objects. A
List
is returned containing the objects
created by (or passed into the rule engine) the executed rules and
filtered with the supplied object filter.
The returned list may not neccessarily include all objects passed, and
may include Object
s created by side-effects. The execution
of a RuleExecutionSet
can add, remove and update objects.
Therefore the returned object list is dependent on the rules that are
part of the executed RuleExecutionSet
as well as Drools
specific rule engine behavior.
- Specified by:
executeRules
in interface StatelessRuleSession
- Parameters:
objects
- the objects used to execute rules.filter
- the object filter.
- Returns:
- a
List
containing the objects as a result
of executing rules, after passing through the supplied
object filter.
- Throws:
InvalidRuleSessionException
- on illegal rule session state.
Copyright © 2001-2005 The Codehaus. All Rights Reserved.