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

RuleBase (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.drools
Interface RuleBase

All Superinterfaces:
Serializable
All Known Subinterfaces:
InternalRuleBase
All Known Implementing Classes:
AbstractRuleBase, ReteooRuleBase

public interface RuleBase
extends 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.

Version:
$Id: RuleBase.java,v 1.2 2005/08/04 23:33:30 mproctor Exp $
Author:
bob mcwhirter
See Also:
WorkingMemory

Field Summary
static int LEAPS
           
static int RETEOO
           
 
Method Summary
 void addPackage(Package pkg)
           
 void addProcess(IProcess process)
           
 Package[] getPackages()
           
 IProcess getProcess(String id)
           
 StatefulSession[] getStatefulSessions()
           
 StatefulSession newStatefulSession()
          Create a new WorkingMemory session for this RuleBase.
 StatefulSession newStatefulSession(boolean keepReference)
          Create a new WorkingMemory session for this RuleBase.
 StatefulSession newStatefulSession(InputStream stream)
          RuleBases handle the returning of a Serialized WorkingMemory pass as an InputStream.
 StatefulSession newStatefulSession(InputStream stream, boolean keepReference)
          RuleBases handle the returning of a Serialized WorkingMemory pass as an InputStream.
 StatelessSession newStatelessSession()
           
 void removePackage(String packageName)
           
 void removeProcess(String id)
           
 void removeRule(String packageName, 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

newStatelessSession

StatelessSession newStatelessSession()

newStatefulSession

StatefulSession newStatefulSession()
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

newStatefulSession

StatefulSession newStatefulSession(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

newStatefulSession

StatefulSession newStatefulSession(InputStream stream)
                                   throws IOException,
                                          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:
IOException
ClassNotFoundException
See Also:
WorkingMemory, DefaultConflictResolver

newStatefulSession

StatefulSession newStatefulSession(InputStream stream,
                                   boolean keepReference)
                                   throws IOException,
                                          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:
IOException
ClassNotFoundException
See Also:
WorkingMemory, DefaultConflictResolver

getPackages

Package[] getPackages()

addPackage

void addPackage(Package pkg)
                throws Exception
Throws:
Exception

removePackage

void removePackage(String packageName)

addProcess

void addProcess(IProcess process)

removeProcess

void removeProcess(String id)

getProcess

IProcess getProcess(String id)

removeRule

void removeRule(String packageName,
                String ruleName)

getStatefulSessions

StatefulSession[] getStatefulSessions()


Copyright © 2001-2007 JBoss Inc.. All Rights Reserved.