|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.common.BaseNode
org.drools.reteoo.LeftTupleSource
org.drools.reteoo.LeftInputAdapterNode
public class LeftInputAdapterNode
All asserting Facts must propagated into the right ObjectSink
side of a BetaNode, if this is the first Pattern
then there are no BetaNodes to propagate to. LeftInputAdapter
is used to adapt an ObjectSink propagation into a
TupleSource
which propagates a ReteTuple
suitable fot the right ReteTuple
side
of a BetaNode
.
Field Summary | |
---|---|
protected boolean |
rootQueryNode
|
Fields inherited from class org.drools.reteoo.LeftTupleSource |
---|
sink |
Fields inherited from class org.drools.common.BaseNode |
---|
associations, id, partitionId, partitionsEnabled |
Constructor Summary | |
---|---|
LeftInputAdapterNode()
|
|
LeftInputAdapterNode(int id,
ObjectSource source,
BuildContext context)
Constructus a LeftInputAdapterNode with a unique id that receives FactHandle from a
parent ObjectSource and adds it to a given pattern in the resulting Tuples. |
Method Summary | |
---|---|
void |
assertObject(InternalFactHandle factHandle,
PropagationContext context,
InternalWorkingMemory workingMemory)
Takes the asserted FactHandleImpl received from the ObjectSource and puts it
in a new ReteTuple before propagating to the TupleSinks |
void |
attach()
Attaches the node into the network. |
void |
attach(InternalWorkingMemory[] workingMemories)
|
protected void |
doRemove(RuleRemovalContext context,
ReteooBuilder builder,
BaseNode node,
InternalWorkingMemory[] workingMemories)
Removes the node from teh network. |
boolean |
equals(Object object)
|
ObjectSinkNode |
getNextObjectSinkNode()
Returns the next node |
ObjectSource |
getParentObjectSource()
|
ObjectSinkNode |
getPreviousObjectSinkNode()
Returns the previous node |
int |
hashCode()
The hashCode return is simply the unique id of the node. |
boolean |
isRootQueryNode()
|
void |
modifyObject(InternalFactHandle factHandle,
ModifyPreviousTuples modifyPreviousTuples,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
networkUpdated()
A method that is called for all nodes whose network below them changed, after the change is complete, providing them with an oportunity for state update |
void |
readExternal(ObjectInput in)
|
void |
setNextObjectSinkNode(ObjectSinkNode next)
Sets the next node |
void |
setPreviousObjectSinkNode(ObjectSinkNode previous)
Sets the previous node |
void |
updateSink(LeftTupleSink sink,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
void |
writeExternal(ObjectOutput out)
|
Methods inherited from class org.drools.reteoo.LeftTupleSource |
---|
addTupleSink, getSinkPropagator, isInUse, removeTupleSink |
Methods inherited from class org.drools.common.BaseNode |
---|
addAssociation, getAssociations, getId, getPartitionId, remove, removeAssociation, setPartitionId, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.drools.common.NetworkNode |
---|
getId, getPartitionId |
Field Detail |
---|
protected boolean rootQueryNode
Constructor Detail |
---|
public LeftInputAdapterNode()
public LeftInputAdapterNode(int id, ObjectSource source, BuildContext context)
FactHandle
from a
parent ObjectSource
and adds it to a given pattern in the resulting Tuples.
id
- The unique id of this node in the current Rete networksource
- The parent node, where Facts are propagated fromMethod Detail |
---|
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
readExternal
in class LeftTupleSource
IOException
ClassNotFoundException
public void writeExternal(ObjectOutput out) throws IOException
writeExternal
in interface Externalizable
writeExternal
in class LeftTupleSource
IOException
public boolean isRootQueryNode()
public ObjectSource getParentObjectSource()
public void attach()
BaseNode
ObjectSource
or TupleSource
attach
in class BaseNode
public void attach(InternalWorkingMemory[] workingMemories)
attach
in class BaseNode
public void networkUpdated()
BaseNode
networkUpdated
in class BaseNode
public void assertObject(InternalFactHandle factHandle, PropagationContext context, InternalWorkingMemory workingMemory)
FactHandleImpl
received from the ObjectSource
and puts it
in a new ReteTuple
before propagating to the TupleSinks
assertObject
in interface ObjectSink
factHandle
- The asserted FactHandle/code>.context
- The PropagationContext
of the WorkingMemory action.workingMemory
- the WorkingMemory
session.
public void modifyObject(InternalFactHandle factHandle, ModifyPreviousTuples modifyPreviousTuples, PropagationContext context, InternalWorkingMemory workingMemory)
modifyObject
in interface ObjectSink
public void updateSink(LeftTupleSink sink, PropagationContext context, InternalWorkingMemory workingMemory)
updateSink
in class LeftTupleSource
protected void doRemove(RuleRemovalContext context, ReteooBuilder builder, BaseNode node, InternalWorkingMemory[] workingMemories)
BaseNode
ObjectSource
or TupleSource
doRemove
in class BaseNode
public ObjectSinkNode getNextObjectSinkNode()
getNextObjectSinkNode
in interface ObjectSinkNode
public void setNextObjectSinkNode(ObjectSinkNode next)
setNextObjectSinkNode
in interface ObjectSinkNode
next
- The next ObjectSinkNodepublic ObjectSinkNode getPreviousObjectSinkNode()
getPreviousObjectSinkNode
in interface ObjectSinkNode
public void setPreviousObjectSinkNode(ObjectSinkNode previous)
setPreviousObjectSinkNode
in interface ObjectSinkNode
previous
- The previous ObjectSinkNodepublic int hashCode()
BaseNode
hashCode
in class BaseNode
public boolean equals(Object object)
equals
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |