|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.reteoo.TupleSource
org.drools.reteoo.ConditionNode
Node which filters ReteTuple
s.
Using a semantic Condition
, this node may allow or disallow
Tuples
to proceed further through the Rete-OO network.
ConditionNode
,
Condition
,
ReteTuple
Constructor Summary | |
(package private) |
ConditionNode(Rule rule,
TupleSource tupleSource,
Condition condition,
int order)
Construct. |
Method Summary | |
void |
assertTuple(ReteTuple tuple,
WorkingMemoryImpl workingMemory)
Assert a new Tuple . |
Condition |
getCondition()
Retrieve the Condition associated with this node. |
Set |
getTupleDeclarations()
Retrieve the Set of Declaration s in the
propagated Tuples . |
TupleSink |
getTupleSink()
Retrieve the TupleSink that receives propagated
Tuples . |
void |
modifyTuples(FactHandle trigger,
TupleSet newTuples,
WorkingMemoryImpl workingMemory)
Modify tuples. |
protected void |
propagateAssertTuple(ReteTuple tuple,
WorkingMemoryImpl workingMemory)
Propagate the assertion of a Tuple to this node's
TupleSink . |
protected void |
propagateModifyTuples(FactHandle trigger,
TupleSet newTuples,
WorkingMemoryImpl workingMemory)
Propagate the modification of Tuple s to this node's
TupleSink . |
protected void |
propagateRetractTuples(TupleKey key,
WorkingMemoryImpl workingMemory)
Propagate the retration of a Tuple to this node's
TupleSink . |
void |
retractTuples(TupleKey key,
WorkingMemoryImpl workingMemory)
Retract tuples. |
protected void |
setTupleSink(TupleSink tupleSink)
Set the TupleSink that receives Tuples
propagated from this TupleSource . |
String |
toString()
Produce a debug string. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
ConditionNode(Rule rule, TupleSource tupleSource, Condition condition, int order)
rule
- The ruletupleSource
- The source of incoming Tuples
.condition
- Method Detail |
public Condition getCondition()
Condition
associated with this node.
Condition
.public Set getTupleDeclarations()
Set
of Declaration
s in the
propagated Tuples
.
getTupleDeclarations
in class TupleSource
Set
of Declarations
in progated
Tuples
.public void assertTuple(ReteTuple tuple, WorkingMemoryImpl workingMemory) throws AssertionException
Tuple
.
assertTuple
in interface TupleSink
tuple
- The Tuple
being asserted.workingMemory
- The working memory seesion.
AssertionException
- If an error occurs while asserting.public void retractTuples(TupleKey key, WorkingMemoryImpl workingMemory) throws RetractionException
retractTuples
in interface TupleSink
key
- The tuple key.workingMemory
- The working memory seesion.
RetractionException
- If an error occurs while retracting.public void modifyTuples(FactHandle trigger, TupleSet newTuples, WorkingMemoryImpl workingMemory) throws FactException
modifyTuples
in interface TupleSink
trigger
- The root fact object handle.newTuples
- Modification replacement tuples.workingMemory
- The working memory session.
FactException
- If an error occurs while modifying.public String toString()
protected void setTupleSink(TupleSink tupleSink)
TupleSink
that receives Tuples
propagated from this TupleSource
.
tupleSink
- The TupleSink
to receive propagated
Tuples
.protected void propagateAssertTuple(ReteTuple tuple, WorkingMemoryImpl workingMemory) throws AssertionException
Tuple
to this node's
TupleSink
.
tuple
- The Tuple
to propagate.workingMemory
- the working memory session.
AssertionException
- If an errors occurs while attempting assertion.protected void propagateRetractTuples(TupleKey key, WorkingMemoryImpl workingMemory) throws RetractionException
Tuple
to this node's
TupleSink
.
key
- The tuple key.workingMemory
- The working memory session.
RetractionException
- If an error occurs while attempting retractionprotected void propagateModifyTuples(FactHandle trigger, TupleSet newTuples, WorkingMemoryImpl workingMemory) throws FactException
Tuple
s to this node's
TupleSink
.
trigger
- The modification trigger object handle.newTuples
- Modification replacement tuples.workingMemory
- The working memory session.
FactException
- If an error occurs while attempting modification.public TupleSink getTupleSink()
TupleSink
that receives propagated
Tuples
.
TupleSink
that receives propagated
Tuples
.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |