org.drools.reteoo
Class TupleSource

java.lang.Object
  extended byorg.drools.reteoo.TupleSource
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
ConditionNode, JoinNode, ParameterNode

abstract class TupleSource
extends Object
implements Serializable

A source of ReteTuple s for a TupleSink.

Nodes that propagate Tuples extend this class.

Author:
bob mcwhirter
See Also:
TupleSource, ReteTuple

Constructor Summary
(package private) TupleSource()
          Construct.
 
Method Summary
abstract  Set getTupleDeclarations()
          Retrieve the available tuple Declarations.
 TupleSink getTupleSink()
          Retrieve the TupleSink that receives propagated Tuples.
protected  void propagateAssertTuple(ReteTuple tuple, WorkingMemoryImpl workingMemory)
          Propagate the assertion of a Tuple to this node's TupleSink.
protected  void propagateModifyTuples(FactHandle trigger, TupleSet newTuples, WorkingMemoryImpl workingMemory)
          Propagate the modification of Tuple s to this node's TupleSink.
protected  void propagateRetractTuples(TupleKey key, WorkingMemoryImpl workingMemory)
          Propagate the retration of a Tuple to this node's TupleSink.
protected  void setTupleSink(TupleSink tupleSink)
          Set the TupleSink that receives Tuples propagated from this TupleSource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TupleSource

TupleSource()
Construct.

Method Detail

setTupleSink

protected void setTupleSink(TupleSink tupleSink)
Set the TupleSink that receives Tuples propagated from this TupleSource.

Parameters:
tupleSink - The TupleSink to receive propagated Tuples.

propagateAssertTuple

protected void propagateAssertTuple(ReteTuple tuple,
                                    WorkingMemoryImpl workingMemory)
                             throws AssertionException
Propagate the assertion of a Tuple to this node's TupleSink.

Parameters:
tuple - The Tuple to propagate.
workingMemory - the working memory session.
Throws:
AssertionException - If an errors occurs while attempting assertion.

propagateRetractTuples

protected void propagateRetractTuples(TupleKey key,
                                      WorkingMemoryImpl workingMemory)
                               throws RetractionException
Propagate the retration of a Tuple to this node's TupleSink.

Parameters:
key - The tuple key.
workingMemory - The working memory session.
Throws:
RetractionException - If an error occurs while attempting retraction

propagateModifyTuples

protected void propagateModifyTuples(FactHandle trigger,
                                     TupleSet newTuples,
                                     WorkingMemoryImpl workingMemory)
                              throws FactException
Propagate the modification of Tuple s to this node's TupleSink.

Parameters:
trigger - The modification trigger object handle.
newTuples - Modification replacement tuples.
workingMemory - The working memory session.
Throws:
FactException - If an error occurs while attempting modification.

getTupleSink

public TupleSink getTupleSink()
Retrieve the TupleSink that receives propagated Tuples.

Returns:
The TupleSink that receives propagated Tuples.

getTupleDeclarations

public abstract Set getTupleDeclarations()
Retrieve the available tuple Declarations.

Returns:
The available tuple declarations.


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