com.haley.haleyrules.jsr94
Class StatelessRuleSessionImpl

java.lang.Object
  |
  +--com.haley.haleyrules.jsr94.HaleyRuleSession
        |
        +--com.haley.haleyrules.jsr94.StatelessRuleSessionImpl
All Implemented Interfaces:
javax.rules.RuleSession, javax.rules.StatelessRuleSession

public class StatelessRuleSessionImpl
extends HaleyRuleSession
implements javax.rules.StatelessRuleSession

This class implements StatelessRuleSession interface. For Haley rules engine, there can be only one thread to access a StatelessRuleSession at any one time.

The StatelessRuleSession 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.


Method Summary
 java.util.List executeRules(java.util.List objects)
          Executes the rules in the bound rule execution set using the supplied list of objects until no rule is executable anymore.
 java.util.List executeRules(java.util.List objects, javax.rules.ObjectFilter filter)
          Executes the rules in the bound rule execution set using the supplied list of objects until no rule is executable anymore.
 int getType()
          Gets the type identifier for this RuleSession.
 
Methods inherited from class com.haley.haleyrules.jsr94.HaleyRuleSession
getRuleExecutionSetMetadata, release
 
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, release
 

Method Detail

executeRules

public java.util.List executeRules(java.util.List objects)
                            throws javax.rules.InvalidRuleSessionException
Executes the rules in the bound rule execution set using the supplied list of objects until no rule is executable anymore. A list is returned over all objects created by the executed rules that pass the default RuleExecutionSet ObjectFilter(if present)
Specified by:
executeRules in interface javax.rules.StatelessRuleSession
Parameters:
objects - the objects ued to execute rules
Returns:
a List over all objects created by the executed rules
Throws:
javax.rules.InvalidRuleSessionException - on illegal rule session state

executeRules

public java.util.List executeRules(java.util.List objects,
                                   javax.rules.ObjectFilter filter)
                            throws javax.rules.InvalidRuleSessionException
Executes the rules in the bound rule execution set using the supplied list of objects until no rule is executable anymore. An iterator is returned over all objects created by the executed rules and filtered with the supplied object filter
Specified by:
executeRules in interface javax.rules.StatelessRuleSession
Parameters:
objects - the objects used to execute rules
filter - the object filter
Returns:
List
Throws:
javax.rules.InvalidRuleSessionException - on illegal rule session state

getType

public int getType()
            throws javax.rules.InvalidRuleSessionException
Gets the type identifier for this RuleSession. The type identifiers are defined in the RuleRuntime interface
Specified by:
getType in interface javax.rules.RuleSession
Overrides:
getType in class HaleyRuleSession
Returns:
int the stateless rule session type
Throws:
javax.rules.InvalidRuleSessionException - on illegal rule session state


Copyright © 2005-2006 Haley Systems, Inc. All Rights Reserved.