org.drools.reteoo
Class LeftTupleSource

java.lang.Object
  extended by org.drools.common.BaseNode
      extended by org.drools.reteoo.LeftTupleSource
All Implemented Interfaces:
Externalizable, Serializable, NetworkNode
Direct Known Subclasses:
BetaNode, EvalConditionNode, FromNode, LeftInputAdapterNode, QueryElementNode, QueryRiaFixerNode

public abstract class LeftTupleSource
extends BaseNode
implements Externalizable

A source of ReteTuple s for a TupleSink.

Nodes that propagate Tuples extend this class.

See Also:
LeftTupleSource, LeftTuple, Serialized Form

Field Summary
protected  LeftTupleSinkPropagator sink
          The destination for Tuples.
 
Fields inherited from class org.drools.common.BaseNode
associations, id, partitionId, partitionsEnabled
 
Constructor Summary
LeftTupleSource()
           
 
Method Summary
 void addTupleSink(LeftTupleSink tupleSink)
          Adds the TupleSink so that it may receive Tuples propagated from this TupleSource.
 LeftTupleSinkPropagator getSinkPropagator()
           
 boolean isInUse()
          Returns true in case the current node is in use (is referenced by any other node)
 void readExternal(ObjectInput in)
           
protected  void removeTupleSink(LeftTupleSink tupleSink)
          Removes the TupleSink
abstract  void updateSink(LeftTupleSink sink, PropagationContext context, InternalWorkingMemory workingMemory)
           
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class org.drools.common.BaseNode
addAssociation, attach, attach, doRemove, getAssociations, getId, getPartitionId, hashCode, networkUpdated, remove, removeAssociation, setPartitionId, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

sink

protected LeftTupleSinkPropagator sink
The destination for Tuples.

Constructor Detail

LeftTupleSource

public LeftTupleSource()
Method Detail

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class BaseNode
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class BaseNode
Throws:
IOException

addTupleSink

public void addTupleSink(LeftTupleSink 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(LeftTupleSink tupleSink)
Removes the TupleSink

Parameters:
tupleSink - The TupleSink to remove

getSinkPropagator

public LeftTupleSinkPropagator getSinkPropagator()

updateSink

public abstract void updateSink(LeftTupleSink 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:


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.