站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 3.0.6 API 英文版文档

RuleBase - JBoss RULES 3.0.6 API 英文版文档


org.drools
Interface RuleBase

All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
InternalRuleBase
All Known Implementing Classes:
AbstractRuleBase, LeapsRuleBase, ReteooRuleBase

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 Package s it contains.

See Also:
WorkingMemory

Field Summary
static int LEAPS
           
static int RETEOO
           
 
Method Summary
 void addPackage(Package pkg)
           
 Package[] getPackages()
           
 java.util.Set getWorkingMemories()
           
 WorkingMemory newWorkingMemory()
          Create a new WorkingMemory session for this RuleBase.
 WorkingMemory newWorkingMemory(boolean keepReference)
          Create a new WorkingMemory session for this RuleBase.
 WorkingMemory newWorkingMemory(java.io.InputStream stream)
          RuleBases handle the returning of a Serialized WorkingMemory pass as an InputStream.
 WorkingMemory newWorkingMemory(java.io.InputStream stream, boolean keepReference)
          RuleBases handle the returning of a Serialized WorkingMemory pass as an InputStream.
 void removePackage(java.lang.String packageName)
           
 void removeRule(java.lang.String packageName, java.lang.String ruleName)
           
 

Field Detail

RETEOO

static final int RETEOO
See Also:
Constant Field Values

LEAPS

static final int LEAPS
See Also:
Constant Field Values
Method Detail

newWorkingMemory

WorkingMemory newWorkingMemory()
Create a new WorkingMemory session for this RuleBase. By default the RuleBase retains a weak reference to returned WorkingMemory.

The created WorkingMemory uses the default conflict resolution strategy.

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

newWorkingMemory

WorkingMemory newWorkingMemory(boolean keepReference)
Create a new WorkingMemory session for this RuleBase. Optionally the RuleBase retains a weak reference to returned WorkingMemory.

The created WorkingMemory uses the default conflict resolution strategy.

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

newWorkingMemory

WorkingMemory newWorkingMemory(java.io.InputStream stream)
                               throws java.io.IOException,
                                      java.lang.ClassNotFoundException
RuleBases handle the returning of a Serialized WorkingMemory pass as an InputStream. If the reference is a byte[] then wrap with new ByteArrayInputStream. By default the RuleBase retains a weak reference to returned WorkingMemory.

The created WorkingMemory uses the default conflict resolution strategy.

Returns:
A serialised initialized WorkingMemory.
Throws:
java.io.IOException
java.lang.ClassNotFoundException
See Also:
WorkingMemory, DefaultConflictResolver

newWorkingMemory

WorkingMemory newWorkingMemory(java.io.InputStream stream,
                               boolean keepReference)
                               throws java.io.IOException,
                                      java.lang.ClassNotFoundException
RuleBases handle the returning of a Serialized WorkingMemory pass as an InputStream. If the reference is a byte[] then wrap with new ByteArrayInputStream. Optionally the RuleBase retains a weak reference to returned WorkingMemory.

The created WorkingMemory uses the default conflict resolution strategy.

Returns:
A serialised initialized WorkingMemory.
Throws:
java.io.IOException
java.lang.ClassNotFoundException
See Also:
WorkingMemory, DefaultConflictResolver

getPackages

Package[] getPackages()

addPackage

void addPackage(Package pkg)
                throws java.lang.Exception
Throws:
java.lang.Exception

removePackage

void removePackage(java.lang.String packageName)

removeRule

void removeRule(java.lang.String packageName,
                java.lang.String ruleName)

getWorkingMemories

java.util.Set getWorkingMemories()