|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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 rule session state. Additionally, objects currently part of the rule session state may be updated.
There are inherently side-effects to adding objects to the rule session state. The execution of a RuleExecutionSet can add, remove and update objects in the rule session state. The objects in the rule session state are therefore dependent on the rules within the RuleExecutionSet as well as the rule engine vendor's specific rule engine behavior.
Handle instances are used by the rule engine vendor to track Objects added to the rule session state. This allows multiple instances of equivalent Objects to be added to the session state and identified, even after serialization.
RuleSession
,
RuleRuntime
,
RuleExecutionSet
,
Rule
Method Summary | |
Handle |
addObject(java.lang.Object object)
Adds a given object to the rule session state of this rule session. |
java.util.List |
addObjects(java.util.List objList)
Adds a List of Objects to the rule session state of this rule session. |
boolean |
containsObject(Handle objectHandle)
Returns true if the given object is contained within rule session state of this rule session. |
void |
executeRules()
Executes the rules in the bound rule execution set using the objects present in the rule session state. |
java.util.List |
getHandles()
Returns a List of the Handles being used for object identity. |
java.lang.Object |
getObject(Handle handle)
Returns the Object within the StatefulRuleSession associated with a Handle. |
java.util.List |
getObjects()
Returns a List of all objects in the rule session state of this rule session. |
java.util.List |
getObjects(ObjectFilter filter)
Returns a List over the objects in rule session state of this rule session. |
void |
removeObject(Handle handleObject)
Removes a given object from the rule session state of this rule session. |
void |
reset()
Resets this rule session. |
void |
updateObject(Handle objectHandle,
java.lang.Object newObject)
Notifies the rules engine that a given object in the rule session state has changed. |
Methods inherited from interface javax.rules.RuleSession |
getRuleExecutionSetMetadata, getType, release |
Method Detail |
public boolean containsObject(Handle objectHandle) throws java.rmi.RemoteException, InvalidRuleSessionException, InvalidHandleException
objectHandle
- the handle to the target object.
InvalidRuleSessionException
- on illegal rule session state.
java.rmi.RemoteException
InvalidHandleException
public Handle addObject(java.lang.Object object) throws java.rmi.RemoteException, InvalidRuleSessionException
object
- the object to be added.
InvalidRuleSessionException
- on illegal rule session state.
java.rmi.RemoteException
public java.util.List addObjects(java.util.List objList) throws java.rmi.RemoteException, InvalidRuleSessionException
objList
- the objects to be added.
InvalidRuleSessionException
- on illegal rule session state.
java.rmi.RemoteException
public void updateObject(Handle objectHandle, java.lang.Object newObject) throws java.rmi.RemoteException, InvalidRuleSessionException, InvalidHandleException
objectHandle
- the handle to the original object.newObject
- the new object to bind to the handle.
InvalidRuleSessionException
- on illegal rule session state.
InvalidHandleException
- if the input Handle is no longer valid
java.rmi.RemoteException
public void removeObject(Handle handleObject) throws java.rmi.RemoteException, InvalidHandleException, InvalidRuleSessionException
handleObject
- the handle to the object to be removed from
the rule session state.
InvalidRuleSessionException
- on illegal rule session state.
InvalidHandleException
- if the input Handle is no longer valid
java.rmi.RemoteException
public java.util.List getObjects() throws java.rmi.RemoteException, InvalidRuleSessionException
InvalidRuleSessionException
- on illegal rule session state.
java.rmi.RemoteException
public java.util.List getHandles() throws java.rmi.RemoteException, InvalidRuleSessionException
java.rmi.RemoteException
InvalidRuleSessionException
public java.util.List getObjects(ObjectFilter filter) throws java.rmi.RemoteException, InvalidRuleSessionException
filter
- the object filter.
InvalidRuleSessionException
- on illegal rule session state.
java.rmi.RemoteException
public void executeRules() throws java.rmi.RemoteException, InvalidRuleSessionException
InvalidRuleSessionException
- on illegal rule session state.
java.rmi.RemoteException
public void reset() throws java.rmi.RemoteException, InvalidRuleSessionException
InvalidRuleSessionException
- on illegal rule session state.
java.rmi.RemoteException
public java.lang.Object getObject(Handle handle) throws java.rmi.RemoteException, InvalidHandleException, InvalidRuleSessionException
InvalidHandleException
- if the Handle is no longer
valid for this StatefulRuleSession
java.rmi.RemoteException
InvalidRuleSessionException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |