org.drools.reteoo
Class RuleBaseImpl

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

class RuleBaseImpl
extends Object
implements RuleBase

Implementation of RuleBase.

Version:
$Id: RuleBaseImpl.java,v 1.25 2004/11/28 20:01:12 mproctor Exp $
Author:
bob mcwhirter

Constructor Summary
(package private) RuleBaseImpl(Rete rete)
          Construct.
(package private) RuleBaseImpl(Rete rete, ConflictResolver conflictResolver, FactHandleFactory factHandleFactory, List ruleSets, Map applicationData)
          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.
 List getRuleSets()
           
(package private)  void modifyObject(FactHandle handle, Object object, WorkingMemoryImpl workingMemory)
          Modify a fact object.
 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)
Construct.

Parameters:
rete - The rete network.
conflictResolver - The conflict resolver.
factHandleFactory - The fact handle factory.
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.

modifyObject

void modifyObject(FactHandle handle,
                  Object object,
                  WorkingMemoryImpl workingMemory)
            throws FactException
Modify a fact object.

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

getRuleSets

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

getApplicationData

public Map getApplicationData()


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