public class RuleRuntimeImpl extends Object implements javax.rules.RuleRuntime
RuleRuntime
interface which
is the access point for runtime execution of RuleExecutionSet
s.
It provides methods to create RuleSession
implementation as
well as methods to retrieve RuleExecutionSet
s 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 FormConstructor 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
RuleExecutionSet s 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.RuleRuntime
uri
- the URI for the RuleExecutionSet
properties
- 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
RuleExecutionSet
javax.rules.RuleSessionCreateException
public List getRegistrations()
List
of the URIs that currently have
RuleExecutionSet
s associated with them. An empty list is
returned is there are no associations.getRegistrations
in interface javax.rules.RuleRuntime
List
of String
s (URIs)Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.