|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.drools.jsr94.rules.RuleSessionImpl | +--org.drools.jsr94.rules.StatefulRuleSessionImpl
This interface is a representation of a stateful rules engine session. A stateful rules engine session exposes a stateful rule execution API to an underlying rules engine. The session allows arbitrary objects to be added and removed to and from the working memory of the associated rules engine. Additionally, objects currently in the working memory may be updated, and the working memory itself can be iterated.
StatefulRuleSession
, Serialized FormMethod Summary | |
javax.rules.Handle |
addObject(java.lang.Object object)
Adds a given object to the working memory of this rule session. |
java.util.List |
addObjects(java.util.List list)
Adds a List of Objects to the working memory of this rule session. |
boolean |
containsObject(javax.rules.Handle handle)
Returns true if the given object is contained within the working memory of this rule session. |
void |
executeRules()
Executes the rules in the bound rule execution set using the objects present in working memory until no rule is executable anymore. |
java.lang.Object |
getObject(javax.rules.Handle handle)
Returns the Object within the StatefulRuleSession associated with a Handle. |
java.util.List |
getObjects()
Returns a List of all objects in the working memory of this rule session that pass the default RuleExecutionSet filter (if present). |
java.util.List |
getObjects(javax.rules.ObjectFilter objectFilter)
Returns a List over the objects in the working memory of this rule session based upon a given object filter. |
javax.rules.RuleExecutionSetMetadata |
getRuleExecutionSetMetadata()
Returns the meta data for the rule execution set bound to this rule session. |
int |
getType()
Returns the type identifier for this RuleSession. |
void |
release()
Releases all resources used by this rule session. |
void |
removeObject(javax.rules.Handle handle)
Removes a given object from the working memory of this rule session. |
void |
reset()
Resets this rule session. |
void |
updateObject(javax.rules.Handle handle,
java.lang.Object object)
Notifies the rules engine that a given object in working memory has changed. |
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, getType |
Method Detail |
public boolean containsObject(javax.rules.Handle handle)
containsObject
in interface javax.rules.StatefulRuleSession
containsObject(javax.rules.Handle)
public javax.rules.Handle addObject(java.lang.Object object) throws javax.rules.InvalidRuleSessionException
addObject
in interface javax.rules.StatefulRuleSession
addObject(java.lang.Object)
public java.util.List addObjects(java.util.List list) throws javax.rules.InvalidRuleSessionException
addObjects
in interface javax.rules.StatefulRuleSession
addObjects(java.util.List)
public void updateObject(javax.rules.Handle handle, java.lang.Object object) throws javax.rules.InvalidRuleSessionException
removeObjectForHandle
followed by addObject
.
The original Handle is rebound to the new value for the Object however.updateObject
in interface javax.rules.StatefulRuleSession
updateObject(javax.rules.Handle, java.lang.Object)
public void removeObject(javax.rules.Handle handle) throws javax.rules.InvalidRuleSessionException
removeObject
in interface javax.rules.StatefulRuleSession
removeObject(javax.rules.Handle)
public java.util.List getObjects()
RuleExecutionSet
filter (if present).getObjects
in interface javax.rules.StatefulRuleSession
getObjects()
public java.util.List getObjects(javax.rules.ObjectFilter objectFilter)
getObjects
in interface javax.rules.StatefulRuleSession
getObjects(ObjectFilter)
public void executeRules() throws javax.rules.InvalidRuleSessionException
executeRules
in interface javax.rules.StatefulRuleSession
executeRules()
public void reset()
reset
in interface javax.rules.StatefulRuleSession
reset()
public java.lang.Object getObject(javax.rules.Handle handle)
StatefulRuleSession
associated with a Handle.getObject
in interface javax.rules.StatefulRuleSession
getObject(javax.rules.Handle)
public void release()
release
in interface javax.rules.RuleSession
release
in class org.drools.jsr94.rules.RuleSessionImpl
public javax.rules.RuleExecutionSetMetadata getRuleExecutionSetMetadata()
getRuleExecutionSetMetadata
in interface javax.rules.RuleSession
public int getType() throws javax.rules.InvalidRuleSessionException
getType
in interface javax.rules.RuleSession
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |