org.drools.reteoo
Class ObjectSource

java.lang.Object
  extended by org.drools.common.BaseNode
      extended by org.drools.reteoo.ObjectSource
All Implemented Interfaces:
java.io.Serializable, NetworkNode
Direct Known Subclasses:
AlphaNode, ObjectTypeNode, Rete, RightInputAdapterNode

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

A source of FactHandles for an ObjectSink.

Nodes that propagate FactHandleImpl extend this class.

Author:
Mark Proctor, Bob McWhirter
See Also:
ObjectSource, DefaultFactHandle, Serialized Form

Field Summary
protected  ObjectSource objectSource
           
protected  ObjectSinkPropagator sink
          The destination for FactHandleImpl.
 
Fields inherited from class org.drools.common.BaseNode
id
 
Method Summary
protected  void addObjectSink(ObjectSink objectSink)
          Adds the ObjectSink so that it may receive FactHandleImpl propagated from this ObjectSource.
 ObjectSinkPropagator getSinkPropagator()
           
 boolean isInUse()
          Returns true in case the current node is in use (is referenced by any other node)
protected  void removeObjectSink(ObjectSink objectSink)
          Removes the ObjectSink
abstract  void updateSink(ObjectSink 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 ObjectSinkPropagator sink
The destination for FactHandleImpl.


objectSource

protected ObjectSource objectSource
Method Detail

addObjectSink

protected void addObjectSink(ObjectSink objectSink)
Adds the ObjectSink so that it may receive FactHandleImpl propagated from this ObjectSource.

Parameters:
objectSink - The ObjectSink to receive propagated FactHandleImpl.

removeObjectSink

protected void removeObjectSink(ObjectSink objectSink)
Removes the ObjectSink

Parameters:
objectSink - The ObjectSink to remove

updateSink

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

getSinkPropagator

public ObjectSinkPropagator getSinkPropagator()

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: