org.drools.reteoo
Class TerminalNode

java.lang.Object
  extended byorg.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
(package private) 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 modifyTuples(FactHandle trigger, TupleSet newTuples, WorkingMemoryImpl workingMemory)
          Modify tuples.
 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.

modifyTuples

public void modifyTuples(FactHandle trigger,
                         TupleSet newTuples,
                         WorkingMemoryImpl workingMemory)
Modify tuples.

Specified by:
modifyTuples in interface TupleSink
Parameters:
trigger - The root fact object handle.
newTuples - Modification replacement tuples.
workingMemory - The working memory session.

toString

public String toString()


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