public class RuleSessionFactory
extends java.lang.Object
implements java.io.Serializable
RuleSessionFactory is an efficient source of
RuleSession instances. Similar to a
RuleSessionPool, a RuleSessionFactory is
initialized with the rules that will be executed in
RuleSessions obtained from it. Once initialized, a
RuleSession can be obtained, used for rule execution, and then
discarded. As with the RuleSessionPool,
RuleSession instances obtained from the factory share
definitions, reducing heap consumption.
RuleSessionFactory is serializable allowing the factory to be
shared in a distributed execution environment.| Constructor and Description |
|---|
RuleSessionFactory(java.util.List<java.lang.String> rl)
Construct a RuleSessionFactory given a list of RL text.
|
RuleSessionFactory(java.util.List<java.lang.String> rl,
java.util.Map config)
Construct a RuleSessionFactory given a list of RL text with the
specified configuration parameters.
|
| Modifier and Type | Method and Description |
|---|---|
RuleSession |
getRuleSession() |
public RuleSessionFactory(java.util.List<java.lang.String> rl)
throws RLException
rl - the list of RL text.RLException - if an error occurs.public RuleSessionFactory(java.util.List<java.lang.String> rl,
java.util.Map config)
throws RLException
rl - the list of RL text.config - RuleSession configuration to be used when creating
new instances. May be null.RLException - if an error occurs.public RuleSession getRuleSession() throws RLException
RLException