public class RuleRuntimeImpl extends Object implements javax.rules.RuleRuntime
RuleRuntime interface which
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.RuleRuntime,
Serialized Form| Constructor and Description |
|---|
RuleRuntimeImpl(RuleExecutionSetRepository repository)
Create a new
RuleRuntimeImpl. |
| Modifier and Type | Method and Description |
|---|---|
javax.rules.RuleSession |
createRuleSession(String uri,
Map properties,
int ruleSessionType)
Creates a
RuleSession implementation using the supplied
Drools-specific rule execution set registration URI. |
List |
getRegistrations()
Retrieves a
List of the URIs that currently have
RuleExecutionSets associated with them. |
public RuleRuntimeImpl(RuleExecutionSetRepository repository)
RuleRuntimeImpl.public javax.rules.RuleSession createRuleSession(String uri, Map properties, int ruleSessionType) throws javax.rules.RuleSessionTypeUnsupportedException, javax.rules.RuleSessionCreateException, javax.rules.RuleExecutionSetNotFoundException
RuleSession implementation using the supplied
Drools-specific rule execution set registration URI.createRuleSession in interface javax.rules.RuleRuntimeuri - the URI for the RuleExecutionSetproperties - additional properties used to create the
RuleSession implementation.ruleSessionType - the type of rule session to create.RuleSession.javax.rules.RuleSessionTypeUnsupportedException - if the ruleSessionType is not supported by Drools or the
RuleExecutionSetjavax.rules.RuleExecutionSetNotFoundException - if the URI could not be resolved into a
RuleExecutionSetjavax.rules.RuleSessionCreateExceptionpublic List getRegistrations()
List of the URIs that currently have
RuleExecutionSets associated with them. An empty list is
returned is there are no associations.getRegistrations in interface javax.rules.RuleRuntimeList of Strings (URIs)Copyright © 2001–2017 JBoss by Red Hat. All rights reserved.