public class StatelessRuleSessionImpl extends Object implements javax.rules.StatelessRuleSession
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| Modifier and Type | Method and Description |
|---|---|
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 org.kie.api.runtime.StatelessKieSession |
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. |
protected org.kie.api.runtime.StatelessKieSession 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 Objects 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.StatelessRuleSessionobjects - 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
Objects 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.StatelessRuleSessionobjects - 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.RuleSessionjavax.rules.InvalidRuleSessionExceptionprotected 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.RuleSessionpublic void release()
RuleRuntime.release in interface javax.rules.RuleSessionCopyright © 2001–2017 JBoss by Red Hat. All rights reserved.