org.drools
Class RuleBaseBuilder

java.lang.Object
  extended by org.drools.RuleBaseBuilder

public class RuleBaseBuilder
extends java.lang.Object

Factory for constructing a RuleBase.

The RuleBaseBuilder integrates the added RuleSet s into the Rete network. A RuleBaseBuilder may be re-used after building a RuleBase but it may not be used to build multiple RuleBase s simultaneously by multiple threads.

See Also:
build(), RuleSet, RuleBase

Constructor Summary
RuleBaseBuilder()
          Construct.
RuleBaseBuilder(RuleBaseContext ruleBaseContext)
          Construct.
 
Method Summary
 void addRuleSet(RuleSet ruleSet)
          Add a RuleSet.
 RuleBase build()
          Build the RuleBase.
 void setConflictResolver(ConflictResolver conflictResolver)
           
 void setFactHandleFactory(FactHandleFactory factHandleFactory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleBaseBuilder

public RuleBaseBuilder()
Construct.


RuleBaseBuilder

public RuleBaseBuilder(RuleBaseContext ruleBaseContext)
Construct.

Method Detail

addRuleSet

public void addRuleSet(RuleSet ruleSet)
                throws RuleSetIntegrationException,
                       RuleIntegrationException
Add a RuleSet.

Parameters:
ruleSet - The rule-set to add.
Throws:
RuleIntegrationException - If an error occurs while attempting to integrate the rules into the Rete network..
RuleSetIntegrationException

build

public RuleBase build()
Build the RuleBase.

Builds the RuleBase based upon all previously added RuleSets.

Returns:
The new rule-base.
See Also:
addRuleSet(org.drools.rule.RuleSet)

setFactHandleFactory

public void setFactHandleFactory(FactHandleFactory factHandleFactory)

setConflictResolver

public void setConflictResolver(ConflictResolver conflictResolver)