Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Business Rules
11g Release 1 (11.1.1)

E10663-02


oracle.rules.jsr94
Class RLStatefulRuleSession

java.lang.Object
  extended by oracle.rules.jsr94.RLStatefulRuleSession

All Implemented Interfaces:
java.io.Serializable, javax.rules.RuleSession, javax.rules.StatefulRuleSession

public class RLStatefulRuleSession
extends java.lang.Object
implements javax.rules.StatefulRuleSession, java.io.Serializable

The Oracle Business Rules implementation of a JSR-94 Stateful rule session.

See Also:
Serialized Form

Method Summary
 javax.rules.Handle addObject(java.lang.Object object)
          Adds an Object to the rule session state of this rule session.
 java.util.List addObjects(java.util.List objects)
          Adds the List of objects to the rule session state of this rule session.
 java.lang.Object callFunction(java.lang.String name)
          Execute the RL function with no arguments, returning result.
 java.lang.Object callFunctionWithArgument(java.lang.String name, java.lang.Object arg)
          Execute the RL function with one argument, returning result.
 java.lang.Object callFunctionWithArgumentArray(java.lang.String name, java.lang.Object[] args)
          Execute the RL function with given array arguments, returning result.
 java.lang.Object callFunctionWithArgumentList(java.lang.String name, java.util.List args)
          Execute the RL function with given list of arguments, returning result.
 boolean containsObject(javax.rules.Handle h)
          Returns true if the Object associated with the specified Handle is in the rule session state of this rule session.
 void executeRules()
          Executes the rules in the rule execution set bound to this rule session.
 java.util.List getHandles()
          Returns a List of Handles, one for each Object in the rule session state for this rule session.
 java.lang.Object getObject(javax.rules.Handle h)
          Returns the Object associated with the specified Handle.
 java.util.List getObjects()
          Returns a List of all objects in the rule session state of this rule session.
 java.util.List getObjects(javax.rules.ObjectFilter filter)
          Returns a List of all objects in the rule session state of this rule session.
 javax.rules.RuleExecutionSetMetadata getRuleExecutionSetMetadata()
           
 int getType()
           
 void release()
           
 void removeObject(javax.rules.Handle h)
          Removes the Object associated with the specified Handle from the rule session state of this rule session.
 void reset()
          Resets this rule session.
 void updateObject(javax.rules.Handle h, java.lang.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, wait

 

Methods inherited from interface javax.rules.RuleSession
getRuleExecutionSetMetadata, getType, release

 

Method Detail

addObject

public javax.rules.Handle addObject(java.lang.Object object)
                             throws javax.rules.InvalidRuleSessionException,
                                    java.rmi.RemoteException
Adds an Object to the rule session state of this rule session.
Specified by:
addObject in interface javax.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 object
java.rmi.RemoteException

addObjects

public java.util.List addObjects(java.util.List objects)
                          throws javax.rules.InvalidRuleSessionException,
                                 java.rmi.RemoteException
Adds the List of objects to the rule session state of this rule session.
Specified by:
addObjects in interface javax.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 objects
java.rmi.RemoteException

containsObject

public boolean containsObject(javax.rules.Handle h)
                       throws javax.rules.InvalidRuleSessionException,
                              javax.rules.InvalidHandleException,
                              java.rmi.RemoteException
Returns true if the Object associated with the specified Handle is in the rule session state of this rule session.
Specified by:
containsObject in interface javax.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 valid
javax.rules.InvalidRuleSessionException - if an error is encountered
java.rmi.RemoteException

updateObject

public void updateObject(javax.rules.Handle h,
                         java.lang.Object newObj)
                  throws javax.rules.InvalidRuleSessionException,
                         javax.rules.InvalidHandleException,
                         java.rmi.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:
updateObject in interface javax.rules.StatefulRuleSession
Parameters:
h - the Handle for the object of interest
newObj - the modified object
Throws:
javax.rules.InvalidHandleException - if the Handle is no longer valid
javax.rules.InvalidRuleSessionException - if an error is encountered updating the object.
java.rmi.RemoteException

removeObject

public void removeObject(javax.rules.Handle h)
                  throws javax.rules.InvalidRuleSessionException,
                         javax.rules.InvalidHandleException,
                         java.rmi.RemoteException
Removes the Object associated with the specified Handle from the rule session state of this rule session.
Specified by:
removeObject in interface javax.rules.StatefulRuleSession
Parameters:
h - the Handle for the object of interest
Throws:
javax.rules.InvalidHandleException - if the Handle is no longer valid
javax.rules.InvalidRuleSessionException - if an error is encountered
java.rmi.RemoteException

getObject

public java.lang.Object getObject(javax.rules.Handle h)
                           throws javax.rules.InvalidRuleSessionException,
                                  javax.rules.InvalidHandleException,
                                  java.rmi.RemoteException
Returns the Object associated with the specified Handle.
Specified by:
getObject in interface javax.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 valid
javax.rules.InvalidRuleSessionException - if an error is encountered
java.rmi.RemoteException

getHandles

public java.util.List getHandles()
                          throws javax.rules.InvalidRuleSessionException,
                                 java.rmi.RemoteException
Returns a List of Handles, one for each Object in the rule session state for this rule session.
Specified by:
getHandles in interface javax.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 encountered
java.rmi.RemoteException

getObjects

public java.util.List getObjects()
                          throws javax.rules.InvalidRuleSessionException,
                                 java.rmi.RemoteException
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:
getObjects in interface javax.rules.StatefulRuleSession
Returns:
a List of Objects.
Throws:
javax.rules.InvalidRuleSessionException - if an error is encountered
java.rmi.RemoteException

getObjects

public java.util.List getObjects(javax.rules.ObjectFilter filter)
                          throws javax.rules.InvalidRuleSessionException,
                                 java.rmi.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:
getObjects in interface javax.rules.StatefulRuleSession
Returns:
a List of Objects.
Throws:
javax.rules.InvalidRuleSessionException - if an error is encountered
java.rmi.RemoteException

executeRules

public void executeRules()
                  throws javax.rules.InvalidRuleSessionException,
                         java.rmi.RemoteException
Executes the rules in the rule execution set bound to this rule session.
Specified by:
executeRules in interface javax.rules.StatefulRuleSession
Throws:
javax.rules.InvalidRuleSessionException - if an error is encountered
java.rmi.RemoteException

reset

public void reset()
           throws javax.rules.InvalidRuleSessionException,
                  java.rmi.RemoteException
Resets this rule session.
Specified by:
reset in interface javax.rules.StatefulRuleSession
Throws:
javax.rules.InvalidRuleSessionException - if an error is encountered
java.rmi.RemoteException

callFunction

public java.lang.Object callFunction(java.lang.String name)
                              throws javax.rules.InvalidRuleSessionException,
                                     java.rmi.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 function
java.rmi.RemoteException

callFunctionWithArgument

public java.lang.Object callFunctionWithArgument(java.lang.String name,
                                                 java.lang.Object arg)
                                          throws javax.rules.InvalidRuleSessionException,
                                                 java.rmi.RemoteException
Execute the RL function with one argument, returning result.
Parameters:
name - name of RL function, optionally ruleset-qualified
arg - Object to pass to function
Returns:
Object result of RL function
Throws:
javax.rules.InvalidRuleSessionException - if an error is encountered executing the function
java.rmi.RemoteException

callFunctionWithArgumentArray

public java.lang.Object callFunctionWithArgumentArray(java.lang.String name,
                                                      java.lang.Object[] args)
                                               throws javax.rules.InvalidRuleSessionException,
                                                      java.rmi.RemoteException
Execute the RL function with given array arguments, returning result.
Parameters:
name - name of RL function, optionally ruleset-qualified
args - array of arguments to pass to function
Returns:
Object result of RL function
Throws:
javax.rules.InvalidRuleSessionException - if an error is encountered executing the function
java.rmi.RemoteException

callFunctionWithArgumentList

public java.lang.Object callFunctionWithArgumentList(java.lang.String name,
                                                     java.util.List args)
                                              throws javax.rules.InvalidRuleSessionException,
                                                     java.rmi.RemoteException
Execute the RL function with given list of arguments, returning result.
Parameters:
name - name of RL function, optionally ruleset-qualified
args - list to pass to function
Returns:
Object result of RL function
Throws:
javax.rules.InvalidRuleSessionException - if an error is encountered executing the function
java.rmi.RemoteException

getRuleExecutionSetMetadata

public javax.rules.RuleExecutionSetMetadata getRuleExecutionSetMetadata()
                                                                 throws javax.rules.InvalidRuleSessionException,
                                                                        java.rmi.RemoteException
Specified by:
getRuleExecutionSetMetadata in interface javax.rules.RuleSession
Throws:
javax.rules.InvalidRuleSessionException
java.rmi.RemoteException

getType

public int getType()
            throws javax.rules.InvalidRuleSessionException,
                   java.rmi.RemoteException
Specified by:
getType in interface javax.rules.RuleSession
Throws:
javax.rules.InvalidRuleSessionException
java.rmi.RemoteException

release

public void release()
             throws javax.rules.InvalidRuleSessionException,
                    java.rmi.RemoteException
Specified by:
release in interface javax.rules.RuleSession
Throws:
javax.rules.InvalidRuleSessionException
java.rmi.RemoteException

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Business Rules
11g Release 1 (11.1.1)

E10663-02


Copyright © 2009, Oracle and/or its affiliates. All rights reserved.