org.drools.reteoo
Class TerminalNode

java.lang.Object
  extended by org.drools.reteoo.TerminalNode
All Implemented Interfaces:
Serializable, TupleSink

final class TerminalNode
extends Object
implements TupleSink

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

Author:
bob mcwhirter
See Also:
Rule

Constructor Summary
TerminalNode(TupleSource inputSource, Rule rule)
          Construct.
 
Method Summary
 void assertTuple(ReteTuple tuple, WorkingMemoryImpl workingMemory)
          Assert a new Tuple.
 Rule getRule()
          Retrieve the Action associated with this node.
 void retractTuples(TupleKey key, WorkingMemoryImpl workingMemory)
          Retract tuples.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TerminalNode

TerminalNode(TupleSource inputSource,
             Rule rule)
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,
                        WorkingMemoryImpl workingMemory)
                 throws AssertionException
Assert a new Tuple.

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

retractTuples

public void retractTuples(TupleKey key,
                          WorkingMemoryImpl workingMemory)
Retract tuples.

Specified by:
retractTuples in interface TupleSink
Parameters:
key - The tuple key.
workingMemory - The working memory seesion.

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2001-2005 The Codehaus. All Rights Reserved.