|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.drools.jsr94.rules.StatelessRuleSessionImpl
public class StatelessRuleSessionImpl
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.
StatelessRuleSession
Method Summary | |
---|---|
protected void |
checkRuleSessionValidity()
Ensures this RuleSession is not
in an illegal rule session state. |
List |
executeRules(List objects)
Executes the rules in the bound rule execution set using the supplied list of objects. |
List |
executeRules(List objects,
javax.rules.ObjectFilter filter)
Executes the rules in the bound rule execution set using the supplied list of objects. |
protected Map |
getProperties()
Returns the additional properties used to create this RuleSession . |
protected RuleExecutionSetImpl |
getRuleExecutionSet()
Returns the Drools RuleExecutionSet associated
with this RuleSession . |
javax.rules.RuleExecutionSetMetadata |
getRuleExecutionSetMetadata()
Returns the meta data for the rule execution set bound to this rule session. |
int |
getType()
|
protected StatelessSession |
newStatelessSession()
Initialize this RuleSession
with a new WorkingMemory . |
void |
release()
Releases all resources used by this rule session. |
protected void |
setProperties(Map properties)
Sets additional properties used to create this RuleSession . |
protected void |
setRuleExecutionSet(RuleExecutionSetImpl ruleExecutionSet)
Sets the Drools RuleExecutionSet associated
with this RuleSession . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.rules.RuleSession |
---|
getRuleExecutionSetMetadata, release |
Method Detail |
---|
protected StatelessSession newStatelessSession()
RuleSession
with a new WorkingMemory
.
public List executeRules(List objects) throws javax.rules.InvalidRuleSessionException
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.
executeRules
in interface javax.rules.StatelessRuleSession
objects
- the objects used to execute rules.
List
containing the objects as a result of
executing the rules.
javax.rules.InvalidRuleSessionException
- on illegal rule session state.public List executeRules(List objects, javax.rules.ObjectFilter filter) throws javax.rules.InvalidRuleSessionException
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.
executeRules
in interface javax.rules.StatelessRuleSession
objects
- the objects used to execute rules.filter
- the object filter.
List
containing the objects as a result of
executing rules, after passing through the supplied object
filter.
javax.rules.InvalidRuleSessionException
- on illegal rule session state.public int getType() throws javax.rules.InvalidRuleSessionException
getType
in interface javax.rules.RuleSession
javax.rules.InvalidRuleSessionException
protected void checkRuleSessionValidity() throws javax.rules.InvalidRuleSessionException
RuleSession
is not
in an illegal rule session state.
javax.rules.InvalidRuleSessionException
- on illegal rule session state.protected void setProperties(Map properties)
RuleSession
.
properties
- additional properties used to create the
RuleSession
implementation.protected Map getProperties()
RuleSession
.
RuleSession
.protected void setRuleExecutionSet(RuleExecutionSetImpl ruleExecutionSet)
RuleExecutionSet
associated
with this RuleSession
.
ruleExecutionSet
- the Drools RuleExecutionSet
to associate
with this RuleSession
.protected RuleExecutionSetImpl getRuleExecutionSet()
RuleExecutionSet
associated
with this RuleSession
.
RuleExecutionSet
associated
with this RuleSession
.public javax.rules.RuleExecutionSetMetadata getRuleExecutionSetMetadata()
getRuleExecutionSetMetadata
in interface javax.rules.RuleSession
public void release()
RuleRuntime
.
release
in interface javax.rules.RuleSession
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |