javax.rules
Interface RuleRuntime

All Superinterfaces:
java.io.Serializable

public interface RuleRuntime
extends java.io.Serializable

This 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:
RuleSession, StatefulRuleSession, StatelessRuleSession

Field Summary
static int STATEFUL_SESSION_TYPE
          StatefulRuleSession type flag.
static int STATELESS_SESSION_TYPE
          StatelessRuleSession type flag.
 
Method Summary
 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.
 

Field Detail

STATEFUL_SESSION_TYPE

public static final int STATEFUL_SESSION_TYPE
StatefulRuleSession type flag.

See Also:
Constant Field Values

STATELESS_SESSION_TYPE

public static final int STATELESS_SESSION_TYPE
StatelessRuleSession type flag.

See Also:
Constant Field Values
Method Detail

createRuleSession

public RuleSession createRuleSession(java.lang.String uri,
                                     java.util.Map properties,
                                     int ruleSessionType)
                              throws RuleSessionTypeUnsupportedException,
                                     RuleSessionCreateException,
                                     RuleExecutionSetNotFoundException,
                                     java.rmi.RemoteException
Creates a RuleSession implementation using the supplied vendor-specific rule execution set registration URI.

Parameters:
uri - the URI for the RuleExecutionSet
properties - additional properties used to create the RuleSession implementation.
ruleSessionType - the type of rule session to create.
Throws:
RuleSessionTypeUnsupportedException - if the ruleSessionType is not supported by the vendor or the RuleExecutionSet
RuleSessionCreateException - if an internal error prevents a RuleSession from being created.
RuleExecutionSetNotFoundException - if the URI could not be resolved into a RuleExecutionSet
java.rmi.RemoteException

getRegistrations

public java.util.List getRegistrations()
                                throws java.rmi.RemoteException
Retrieves a List of the URIs that currently have RuleExecutionSets associated with them. An empty list is returned is there are no associations.

Returns:
a List of Strings (URIs)
Throws:
java.rmi.RemoteException


Copyright © 2004 Java Community Process. All Rights Reserved.