org.drools.reteoo
Class RuleBaseImpl

java.lang.Object
  extended by org.drools.reteoo.RuleBaseImpl
All Implemented Interfaces:
Serializable, RuleBase

 class RuleBaseImpl
extends Object
implements RuleBase

Implementation of RuleBase.

Version:
$Id: RuleBaseImpl.java,v 1.28 2005/02/02 00:23:22 mproctor Exp $
Author:
bob mcwhirter

Constructor Summary
RuleBaseImpl(Rete rete)
          Construct.
RuleBaseImpl(Rete rete, ConflictResolver conflictResolver, FactHandleFactory factHandleFactory, List ruleSets, Map applicationData, RuleBaseContext ruleBaseContext)
          Construct.
 
Method Summary
(package private)  void assertObject(FactHandle handle, Object object, WorkingMemoryImpl workingMemory)
          Assert a fact object.
 Map getApplicationData()
           
 ConflictResolver getConflictResolver()
          Retrieve the ConflictResolver.
 FactHandleFactory getFactHandleFactory()
          Retrieve the FactHandleFactor.
(package private)  Rete getRete()
          Retrieve the Rete-OO network for this RuleBase.
 RuleBaseContext getRuleBaseContext()
           
 List getRuleSets()
           
 WorkingMemory newWorkingMemory()
          Create a new WorkingMemory session for this RuleBase.
(package private)  void retractObject(FactHandle handle, WorkingMemoryImpl workingMemory)
          Retract a fact object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleBaseImpl

RuleBaseImpl(Rete rete)
Construct.

Parameters:
rete - The rete network.

RuleBaseImpl

RuleBaseImpl(Rete rete,
             ConflictResolver conflictResolver,
             FactHandleFactory factHandleFactory,
             List ruleSets,
             Map applicationData,
             RuleBaseContext ruleBaseContext)
Construct.

Parameters:
rete - The rete network.
conflictResolver - The conflict resolver.
factHandleFactory - The fact handle factory.
ruleSets -
applicationData -
Method Detail

newWorkingMemory

public WorkingMemory newWorkingMemory()
Description copied from interface: RuleBase
Create a new WorkingMemory session for this RuleBase.

The created WorkingMemory uses the default conflict resolution strategy.

Specified by:
newWorkingMemory in interface RuleBase
Returns:
A newly initialized WorkingMemory.
See Also:
RuleBase

getFactHandleFactory

public FactHandleFactory getFactHandleFactory()
Description copied from interface: RuleBase
Retrieve the FactHandleFactor.

Specified by:
getFactHandleFactory in interface RuleBase
Returns:
The fact handle factory.
See Also:
RuleBase

getConflictResolver

public ConflictResolver getConflictResolver()
Description copied from interface: RuleBase
Retrieve the ConflictResolver.

Specified by:
getConflictResolver in interface RuleBase
Returns:
The conflict resolution strategy.
See Also:
RuleBase

getRete

Rete getRete()
Retrieve the Rete-OO network for this RuleBase.

Returns:
The RETE-OO network.

assertObject

void assertObject(FactHandle handle,
                  Object object,
                  WorkingMemoryImpl workingMemory)
            throws FactException
Assert a fact object.

Parameters:
handle - The handle.
object - The fact.
workingMemory - The working-memory.
Throws:
FactException - If an error occurs while performing the assertion.

retractObject

void retractObject(FactHandle handle,
                   WorkingMemoryImpl workingMemory)
             throws FactException
Retract a fact object.

Parameters:
handle - The handle.
workingMemory - The working-memory.
Throws:
FactException - If an error occurs while performing the retraction.

getRuleSets

public List getRuleSets()
Specified by:
getRuleSets in interface RuleBase

getApplicationData

public Map getApplicationData()

getRuleBaseContext

public RuleBaseContext getRuleBaseContext()
Specified by:
getRuleBaseContext in interface RuleBase


Copyright © 2001-2005 The Codehaus. All Rights Reserved.