org.drools
Interface RuleBase

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
SerializableRuleBaseProxy

public interface RuleBase
extends java.io.Serializable

Active collection of Rules.

From a RuleBase many WorkingMemory rule sessions may be instantiated. Additionally, it may be inspected to determine which RuleSet s it contains.

See Also:
WorkingMemory

Method Summary
 ConflictResolver getConflictResolver()
          Retrieve the ConflictResolver.
 WorkingMemory getCurrentThreadWorkingMemory()
          Get or create a WorkingMemory session for this RuleBase and the current thread.
 RuleBaseContext getRuleBaseContext()
           
 java.util.List getRuleSets()
           
 WorkingMemory newWorkingMemory()
          Create a new WorkingMemory session for this RuleBase.
 

Method Detail

newWorkingMemory

WorkingMemory newWorkingMemory()
Create a new WorkingMemory session for this RuleBase.

The created WorkingMemory uses the default conflict resolution strategy.

Returns:
A newly initialized WorkingMemory.
See Also:
WorkingMemory, DefaultConflictResolver

getConflictResolver

ConflictResolver getConflictResolver()
Retrieve the ConflictResolver.

Returns:
The conflict resolution strategy.

getRuleSets

java.util.List getRuleSets()

getRuleBaseContext

RuleBaseContext getRuleBaseContext()

getCurrentThreadWorkingMemory

WorkingMemory getCurrentThreadWorkingMemory()
Get or create a WorkingMemory session for this RuleBase and the current thread.

This is useful for web application users, and allows a long running working memory that will be garbage collected when the thread ends. Uses a ThreadLocal instance.

The created WorkingMemory uses the default conflict resolution strategy.

Returns:
the current threads WorkingMemory or a new one if the current thread did not have a working memory assigned.
See Also:
WorkingMemory, DefaultConflictResolver