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

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


org.drools.reteoo
Class QueryTerminalNode

java.lang.Object
  extended by org.drools.common.BaseNode
      extended by org.drools.reteoo.QueryTerminalNode
All Implemented Interfaces:
Serializable, NetworkNode, NodeMemory, TerminalNode, TupleSink

public final class QueryTerminalNode
extends BaseNode
implements TupleSink, NodeMemory, TerminalNode

Leaf Rete-OO node responsible for enacting Action s on a matched Rule.

Author:
bob mcwhirter
See Also:
Rule, Serialized Form

Field Summary
 
Fields inherited from class org.drools.common.BaseNode
hasMemory, id, sharedCount
 
Constructor Summary
QueryTerminalNode(int id, TupleSource source, Rule rule, GroupElement subrule)
          Construct.
 
Method Summary
 void assertTuple(ReteTuple tuple, PropagationContext context, InternalWorkingMemory workingMemory)
          Assert a new Tuple.
 void attach()
          Attaches the node into the network.
 void attach(InternalWorkingMemory[] workingMemories)
           
 Object createMemory(RuleBaseConfiguration config)
           
 Rule getRule()
          Retrieve the Action associated with this node.
 GroupElement getSubrule()
           
 void remove(BaseNode node, InternalWorkingMemory[] workingMemories)
          Removes the node from teh network.
 void retractTuple(ReteTuple tuple, PropagationContext context, InternalWorkingMemory workingMemory)
           
 void ruleAttached()
           
 String toString()
           
 void updateNewNode(InternalWorkingMemory workingMemory, PropagationContext context)
           
 
Methods inherited from class org.drools.common.BaseNode
addShare, getId, getSharedCount, hashCode, hasMemory, isInUse, isShared, removeShare, setHasMemory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.drools.common.NodeMemory
getId
 

Constructor Detail

QueryTerminalNode

public QueryTerminalNode(int id,
                         TupleSource source,
                         Rule rule,
                         GroupElement subrule)
Construct.

Parameters:
inputSource - The parent tuple source.
rule - The rule.
Method Detail

getRule

public Rule getRule()
Retrieve the Action associated with this node.

Returns:
The Action associated with this node.

assertTuple

public void assertTuple(ReteTuple tuple,
                        PropagationContext context,
                        InternalWorkingMemory workingMemory)
Assert a new Tuple.

Specified by:
assertTuple in interface TupleSink
Parameters:
tuple - The Tuple being asserted.
workingMemory - The working memory seesion.
context - The PropagationContext of the WorkingMemory action
Throws:
AssertionException - If an error occurs while asserting.

retractTuple

public void retractTuple(ReteTuple tuple,
                         PropagationContext context,
                         InternalWorkingMemory workingMemory)
Specified by:
retractTuple in interface TupleSink

toString

public String toString()
Overrides:
toString in class BaseNode

ruleAttached

public void ruleAttached()

attach

public void attach()
Description copied from class: BaseNode
Attaches the node into the network. Usually to the parent ObjectSource or TupleSource

Specified by:
attach in class BaseNode

attach

public void attach(InternalWorkingMemory[] workingMemories)
Specified by:
attach in class BaseNode

remove

public void remove(BaseNode node,
                   InternalWorkingMemory[] workingMemories)
Description copied from class: BaseNode
Removes the node from teh network. Usually from the parent ObjectSource or TupleSource

Specified by:
remove in class BaseNode

updateNewNode

public void updateNewNode(InternalWorkingMemory workingMemory,
                          PropagationContext context)

createMemory

public Object createMemory(RuleBaseConfiguration config)
Specified by:
createMemory in interface NodeMemory

getSubrule

public GroupElement getSubrule()
Returns:
the subrule


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