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

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


org.drools.reteoo
Class RuleTerminalNode

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

public final class RuleTerminalNode
extends BaseNode
implements TupleSinkNode, 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
RuleTerminalNode(int id, TupleSource source, Rule rule, GroupElement subrule)
          Construct.
 
Method Summary
 void assertTuple(ReteTuple tuple, PropagationContext context, InternalWorkingMemory workingMemory)
          Assert a new ReteTuple.
 void assertTuple(ReteTuple tuple, PropagationContext context, InternalWorkingMemory workingMemory, boolean fireActivationCreated)
          Assert a new Tuple.
 void attach()
          Attaches the node into the network.
 void attach(InternalWorkingMemory[] workingMemories)
           
 Object createMemory(RuleBaseConfiguration config)
           
 boolean equals(Object object)
           
 TupleSinkNode getNextTupleSinkNode()
          Returns the next node
 TupleSinkNode getPreviousTupleSinkNode()
          Returns the previous node
 Rule getRule()
          Retrieve the Action associated with this node.
 int hashCode()
          The hashCode return is simply the unique id of the node.
 void remove(BaseNode node, InternalWorkingMemory[] workingMemories)
          Removes the node from teh network.
 void retractTuple(ReteTuple leftTuple, PropagationContext context, InternalWorkingMemory workingMemory)
           
 void ruleAttached()
           
 void setNextTupleSinkNode(TupleSinkNode next)
          Sets the next node
 void setPreviousTupleSinkNode(TupleSinkNode previous)
          Sets the previous node
 String toString()
           
 
Methods inherited from class org.drools.common.BaseNode
addShare, getId, getSharedCount, hasMemory, isInUse, isShared, removeShare, setHasMemory
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.drools.common.NodeMemory
getId
 

Constructor Detail

RuleTerminalNode

public RuleTerminalNode(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)
Description copied from interface: TupleSink
Assert a new ReteTuple.

Specified by:
assertTuple in interface TupleSink
Parameters:
tuple - The ReteTuple to propagate.
context - The PropagationContext of the WorkingMemory action
workingMemory - the WorkingMemory session.

assertTuple

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

Parameters:
tuple - The Tuple being asserted.
workingMemory - The working memory seesion.
Throws:
AssertionException - If an error occurs while asserting.

retractTuple

public void retractTuple(ReteTuple leftTuple,
                         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

createMemory

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

getNextTupleSinkNode

public TupleSinkNode getNextTupleSinkNode()
Returns the next node

Specified by:
getNextTupleSinkNode in interface TupleSinkNode
Returns:
The next TupleSinkNode

setNextTupleSinkNode

public void setNextTupleSinkNode(TupleSinkNode next)
Sets the next node

Specified by:
setNextTupleSinkNode in interface TupleSinkNode
Parameters:
next - The next TupleSinkNode

getPreviousTupleSinkNode

public TupleSinkNode getPreviousTupleSinkNode()
Returns the previous node

Specified by:
getPreviousTupleSinkNode in interface TupleSinkNode
Returns:
The previous TupleSinkNode

setPreviousTupleSinkNode

public void setPreviousTupleSinkNode(TupleSinkNode previous)
Sets the previous node

Specified by:
setPreviousTupleSinkNode in interface TupleSinkNode
Parameters:
previous - The previous TupleSinkNode

hashCode

public int hashCode()
Description copied from class: BaseNode
The hashCode return is simply the unique id of the node. It is expected that base classes will also implement equals(Object object).

Overrides:
hashCode in class BaseNode

equals

public boolean equals(Object object)
Overrides:
equals in class Object


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