com.haley.haleyrules.jsr94
Class RuleRuntimeImpl
java.lang.Object
|
+--com.haley.haleyrules.jsr94.RuleRuntimeImpl
- All Implemented Interfaces:
- javax.rules.RuleRuntime, java.io.Serializable
- public class RuleRuntimeImpl
- extends java.lang.Object
- implements javax.rules.RuleRuntime, java.io.Serializable
This class implements the RuleRuntime interface. The RuleRuntime interface is the access point for runtime execution of RuleExecutionSets. It provides methods to create
RuleSession implementation as well as methods to retrieve RuleExecutionSets that have been previously registered
using the RuleAdministrator.
The RuleRuntime should be accessed through the RuleServiceProvider. An instance of the RuleRuntime can be retrieved
by calling:
RuleServiceProvider ruleServiceProvider = RuleServiceProvider.newInstance(); RuleRuntime ruleRuntime =
ruleServiceProvider.getRuleRuntime();
Note: the release method must be called on the RuleSession to clean up all resources used by the RuleSession.
- See Also:
- Serialized Form
| Fields inherited from interface javax.rules.RuleRuntime |
STATEFUL_SESSION_TYPE, STATELESS_SESSION_TYPE |
|
Method Summary |
javax.rules.RuleSession |
createRuleSession(java.lang.String uri,
java.util.Map properties,
int ruleSessionType)
Creates a RuleSession implementation using the supplied vendor-specific rule execution set registration URI |
java.util.List |
getRegistrations()
Retrieves a List of the URIs that currently have RuleExecutionSets associated with them. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
createRuleSession
public javax.rules.RuleSession createRuleSession(java.lang.String uri,
java.util.Map properties,
int ruleSessionType)
throws javax.rules.RuleSessionTypeUnsupportedException,
javax.rules.RuleSessionCreateException,
javax.rules.RuleExecutionSetNotFoundException
- Creates a RuleSession implementation using the supplied vendor-specific rule execution set registration URI
- Specified by:
createRuleSession in interface javax.rules.RuleRuntime
- Parameters:
uri - the URI for the RuleExecutionSetproperties - additional properties used to create the RuleSession imlementationruleSessionType - the type of rule session to create- Returns:
- RuleSession
- Throws:
javax.rules.RuleSessionTypeUnsupportedException - if the ruleSessionType is not supported by the vendor or the RuleExecutionSetjavax.rules.RuleSessionCreateException - if an internal error prevents a RuleSession from being created.javax.rules.RuleExecutionSetNotFoundException - if the URI could not be resolved into a RuleExecutionSet
getRegistrations
public java.util.List getRegistrations()
- Retrieves a List of the URIs that currently have RuleExecutionSets associated with them. An empty list is
returned if there are no associations
- Specified by:
getRegistrations in interface javax.rules.RuleRuntime
- Returns:
- List a list of Strings (URIs)
Copyright © 2005-2006 Haley Systems, Inc. All Rights Reserved.