Package oracle.rules.jsr94
Class RLStatefulRuleSession
java.lang.Object
oracle.rules.jsr94.RLStatefulRuleSession
- All Implemented Interfaces:
Serializable,javax.rules.RuleSession,javax.rules.StatefulRuleSession
public class RLStatefulRuleSession
extends Object
implements javax.rules.StatefulRuleSession, Serializable
The Oracle Business Rules implementation of a JSR-94 Stateful rule session.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionjavax.rules.HandleAdds an Object to the rule session state of this rule session.addObjects(List objects) Adds the List of objects to the rule session state of this rule session.callFunction(String name) Execute the RL function with no arguments, returning result.callFunctionWithArgument(String name, Object arg) Execute the RL function with one argument, returning result.callFunctionWithArgumentArray(String name, Object[] args) Execute the RL function with given array arguments, returning result.callFunctionWithArgumentList(String name, List args) Execute the RL function with given list of arguments, returning result.booleancontainsObject(javax.rules.Handle h) Returns true if the Object associated with the specified Handle is in the rule session state of this rule session.voidExecutes the rules in the rule execution set bound to this rule session.Returns a List of Handles, one for each Object in the rule session state for this rule session.getObject(javax.rules.Handle h) Returns the Object associated with the specified Handle.Returns a List of all objects in the rule session state of this rule session.getObjects(javax.rules.ObjectFilter filter) Returns a List of all objects in the rule session state of this rule session.javax.rules.RuleExecutionSetMetadataintgetType()voidrelease()voidremoveObject(javax.rules.Handle h) Removes the Object associated with the specified Handle from the rule session state of this rule session.voidreset()Resets this rule session.voidupdateObject(javax.rules.Handle h, Object newObj) Updates the rule session state to reflect that the specified object should be now associated with the specified handle.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface javax.rules.RuleSession
getRuleExecutionSetMetadata, getType, release
-
Method Details
-
addObject
public javax.rules.Handle addObject(Object object) throws javax.rules.InvalidRuleSessionException, RemoteException Adds an Object to the rule session state of this rule session.- Specified by:
addObjectin interfacejavax.rules.StatefulRuleSession- Parameters:
object- the Object to add- Returns:
- the Handle for the newly added object
- Throws:
javax.rules.InvalidRuleSessionException- if an error is encountered adding the objectRemoteException
-
addObjects
public List addObjects(List objects) throws javax.rules.InvalidRuleSessionException, RemoteException Adds the List of objects to the rule session state of this rule session.- Specified by:
addObjectsin interfacejavax.rules.StatefulRuleSession- Parameters:
objects- the object to add- Returns:
- a List of Handles for the newly added objects
- Throws:
javax.rules.InvalidRuleSessionException- if an error is encountered adding the objectsRemoteException
-
containsObject
public boolean containsObject(javax.rules.Handle h) throws javax.rules.InvalidRuleSessionException, javax.rules.InvalidHandleException, RemoteException Returns true if the Object associated with the specified Handle is in the rule session state of this rule session.- Specified by:
containsObjectin interfacejavax.rules.StatefulRuleSession- Parameters:
h- the Handle for the object of interest- Returns:
- true if the Object associated with the specified Handle is in the rule session state of this rule session.
- Throws:
javax.rules.InvalidHandleException- if the Handle is no longer validjavax.rules.InvalidRuleSessionException- if an error is encounteredRemoteException
-
updateObject
public void updateObject(javax.rules.Handle h, Object newObj) throws javax.rules.InvalidRuleSessionException, javax.rules.InvalidHandleException, RemoteException Updates the rule session state to reflect that the specified object should be now associated with the specified handle. This may be the original object reference with modified content or a new object reference.- Specified by:
updateObjectin interfacejavax.rules.StatefulRuleSession- Parameters:
h- the Handle for the object of interestnewObj- the modified object- Throws:
javax.rules.InvalidHandleException- if the Handle is no longer validjavax.rules.InvalidRuleSessionException- if an error is encountered updating the object.RemoteException
-
removeObject
public void removeObject(javax.rules.Handle h) throws javax.rules.InvalidRuleSessionException, javax.rules.InvalidHandleException, RemoteException Removes the Object associated with the specified Handle from the rule session state of this rule session.- Specified by:
removeObjectin interfacejavax.rules.StatefulRuleSession- Parameters:
h- the Handle for the object of interest- Throws:
javax.rules.InvalidHandleException- if the Handle is no longer validjavax.rules.InvalidRuleSessionException- if an error is encounteredRemoteException
-
getObject
public Object getObject(javax.rules.Handle h) throws javax.rules.InvalidRuleSessionException, javax.rules.InvalidHandleException, RemoteException Returns the Object associated with the specified Handle.- Specified by:
getObjectin interfacejavax.rules.StatefulRuleSession- Parameters:
h- the Handle for the object of interest- Returns:
- the Object associated with the specified Handle.
- Throws:
javax.rules.InvalidHandleException- if the Handle is no longer validjavax.rules.InvalidRuleSessionException- if an error is encounteredRemoteException
-
getHandles
Returns a List of Handles, one for each Object in the rule session state for this rule session.- Specified by:
getHandlesin interfacejavax.rules.StatefulRuleSession- Returns:
- a List of Handles, one for each Object in the rule session state for this rule session.
- Throws:
javax.rules.InvalidRuleSessionException- if an error is encounteredRemoteException
-
getObjects
Returns a List of all objects in the rule session state of this rule session. The objects are filtered by the default RuleExecutionSet filter (if present).- Specified by:
getObjectsin interfacejavax.rules.StatefulRuleSession- Returns:
- a List of Objects.
- Throws:
javax.rules.InvalidRuleSessionException- if an error is encounteredRemoteException
-
getObjects
public List getObjects(javax.rules.ObjectFilter filter) throws javax.rules.InvalidRuleSessionException, RemoteException Returns a List of all objects in the rule session state of this rule session. The objects are filtered by the specified filter.- Specified by:
getObjectsin interfacejavax.rules.StatefulRuleSession- Returns:
- a List of Objects.
- Throws:
javax.rules.InvalidRuleSessionException- if an error is encounteredRemoteException
-
executeRules
Executes the rules in the rule execution set bound to this rule session.- Specified by:
executeRulesin interfacejavax.rules.StatefulRuleSession- Throws:
javax.rules.InvalidRuleSessionException- if an error is encounteredRemoteException
-
reset
Resets this rule session.- Specified by:
resetin interfacejavax.rules.StatefulRuleSession- Throws:
javax.rules.InvalidRuleSessionException- if an error is encounteredRemoteException
-
callFunction
public Object callFunction(String name) throws javax.rules.InvalidRuleSessionException, RemoteException Execute the RL function with no arguments, returning result.- Parameters:
name- name of RL function, optionally ruleset-qualified- Returns:
- Object result of RL function
- Throws:
javax.rules.InvalidRuleSessionException- if an error is encountered executing the functionRemoteException
-
callFunctionWithArgument
public Object callFunctionWithArgument(String name, Object arg) throws javax.rules.InvalidRuleSessionException, RemoteException Execute the RL function with one argument, returning result.- Parameters:
name- name of RL function, optionally ruleset-qualifiedarg- Object to pass to function- Returns:
- Object result of RL function
- Throws:
javax.rules.InvalidRuleSessionException- if an error is encountered executing the functionRemoteException
-
callFunctionWithArgumentArray
public Object callFunctionWithArgumentArray(String name, Object[] args) throws javax.rules.InvalidRuleSessionException, RemoteException Execute the RL function with given array arguments, returning result.- Parameters:
name- name of RL function, optionally ruleset-qualifiedargs- array of arguments to pass to function- Returns:
- Object result of RL function
- Throws:
javax.rules.InvalidRuleSessionException- if an error is encountered executing the functionRemoteException
-
callFunctionWithArgumentList
public Object callFunctionWithArgumentList(String name, List args) throws javax.rules.InvalidRuleSessionException, RemoteException Execute the RL function with given list of arguments, returning result.- Parameters:
name- name of RL function, optionally ruleset-qualifiedargs- list to pass to function- Returns:
- Object result of RL function
- Throws:
javax.rules.InvalidRuleSessionException- if an error is encountered executing the functionRemoteException
-
getRuleExecutionSetMetadata
public javax.rules.RuleExecutionSetMetadata getRuleExecutionSetMetadata() throws javax.rules.InvalidRuleSessionException, RemoteException- Specified by:
getRuleExecutionSetMetadatain interfacejavax.rules.RuleSession- Throws:
javax.rules.InvalidRuleSessionExceptionRemoteException
-
getType
- Specified by:
getTypein interfacejavax.rules.RuleSession- Throws:
javax.rules.InvalidRuleSessionExceptionRemoteException
-
release
- Specified by:
releasein interfacejavax.rules.RuleSession- Throws:
javax.rules.InvalidRuleSessionExceptionRemoteException
-