org.drools.reteoo
Class TupleSource

java.lang.Object
  extended by org.drools.common.BaseNode
      extended by org.drools.reteoo.TupleSource
All Implemented Interfaces:
java.io.Serializable, NetworkNode
Direct Known Subclasses:
AccumulateNode, CollectNode, EvalConditionNode, ExistsNode, FromNode, JoinNode, LeftInputAdapterNode, NotNode

public abstract class TupleSource
extends BaseNode
implements java.io.Serializable

A source of ReteTuple s for a TupleSink.

Nodes that propagate Tuples extend this class.

Author:
Mark Proctor, Bob McWhirter
See Also:
TupleSource, ReteTuple, Serialized Form

Field Summary
protected  TupleSinkPropagator sink
          The destination for Tuples.
 
Fields inherited from class org.drools.common.BaseNode
id
 
Method Summary
protected  void addTupleSink(TupleSink tupleSink)
          Adds the TupleSink so that it may receive Tuples propagated from this TupleSource.
 TupleSinkPropagator getSinkPropagator()
           
 boolean isInUse()
          Returns true in case the current node is in use (is referenced by any other node)
protected  void removeTupleSink(TupleSink tupleSink)
          Removes the TupleSink
abstract  void updateSink(TupleSink sink, PropagationContext context, InternalWorkingMemory workingMemory)
           
 
Methods inherited from class org.drools.common.BaseNode
attach, attach, getId, hashCode, remove, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

sink

protected TupleSinkPropagator sink
The destination for Tuples.

Method Detail

addTupleSink

protected void addTupleSink(TupleSink tupleSink)
Adds the TupleSink so that it may receive Tuples propagated from this TupleSource.

Parameters:
tupleSink - The TupleSink to receive propagated Tuples.

removeTupleSink

protected void removeTupleSink(TupleSink tupleSink)
Removes the TupleSink

Parameters:
tupleSink - The TupleSink to remove

getSinkPropagator

public TupleSinkPropagator getSinkPropagator()

updateSink

public abstract void updateSink(TupleSink sink,
                                PropagationContext context,
                                InternalWorkingMemory workingMemory)

isInUse

public boolean isInUse()
Description copied from class: BaseNode
Returns true in case the current node is in use (is referenced by any other node)

Specified by:
isInUse in class BaseNode
Returns: