|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.drools.common.BaseNode org.drools.reteoo.TupleSource 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 |
---|
Fields inherited from class org.drools.reteoo.TupleSource |
---|
sink |
Fields inherited from class org.drools.common.BaseNode |
---|
hasMemory, id, sharedCount |
Constructor Summary | |
---|---|
LeftInputAdapterNode(int id,
ObjectSource source)
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 handle,
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)
|
Object |
createMemory(RuleBaseConfiguration config)
|
boolean |
equals(Object object)
|
ObjectSinkNode |
getNextObjectSinkNode()
Returns the next node |
ObjectSinkNode |
getPreviousObjectSinkNode()
Returns the previous node |
int |
hashCode()
The hashCode return is simply the unique id of the node. |
void |
remove(BaseNode node,
InternalWorkingMemory[] workingMemories)
Removes the node from teh network. |
void |
retractObject(InternalFactHandle handle,
PropagationContext context,
InternalWorkingMemory workingMemory)
Retract an existing FactHandleImpl by placing it in a new ReteTuple before
proagating to the TupleSinks |
void |
setNextObjectSinkNode(ObjectSinkNode next)
Sets the next node |
void |
setPreviousObjectSinkNode(ObjectSinkNode previous)
Sets the previous node |
void |
updateSink(TupleSink sink,
PropagationContext context,
InternalWorkingMemory workingMemory)
|
Methods inherited from class org.drools.reteoo.TupleSource |
---|
addTupleSink, getSinkPropagator, removeTupleSink |
Methods inherited from class org.drools.common.BaseNode |
---|
addShare, getId, getSharedCount, hasMemory, isInUse, isShared, removeShare, setHasMemory, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.drools.common.NodeMemory |
---|
getId |
Constructor Detail |
---|
public LeftInputAdapterNode(int id, ObjectSource source)
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 frombinder
- An optional binder to filter out propagations. This binder will exist when
a predicate is used in the first pattern, for instanceMethod Detail |
---|
public void attach()
BaseNode
ObjectSource
or TupleSource
public void attach(InternalWorkingMemory[] workingMemories)
public void assertObject(InternalFactHandle handle, 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
handle
- The asserted FactHandle/code>.context
- The PropagationContext
of the WorkingMemory action.workingMemory
- the WorkingMemory
session.
public void retractObject(InternalFactHandle handle, PropagationContext context, InternalWorkingMemory workingMemory)
FactHandleImpl
by placing it in a new ReteTuple
before
proagating to the TupleSinks
retractObject
in interface ObjectSink
handle
- The FactHandle/code> to retract.context
- The PropagationContext
of the WorkingMemory action.workingMemory
- the WorkingMemory
session.
public void updateSink(TupleSink sink, PropagationContext context, InternalWorkingMemory workingMemory)
updateSink
in class TupleSource
public void remove(BaseNode node, InternalWorkingMemory[] workingMemories)
BaseNode
ObjectSource
or TupleSource
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
public boolean equals(Object object)
public Object createMemory(RuleBaseConfiguration config)
createMemory
in interface NodeMemory
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |