|
|||||||||||
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.ParameterNode
Receives Objects
from an ObjectTypeNode
, and
creates a ReteTuple
, passing the result to the following
node.
The ParameterNode
is the first node that works in terms of
Tuples
. An instance of ParameterNode
exists
for each root fact object parameter of each rule.
ObjectTypeNode
,
TupleSink
Constructor Summary | |
ParameterNode(ObjectTypeNode inputNode,
Declaration declaration)
Construct. |
Method Summary | |
(package private) void |
assertObject(FactHandle handle,
Object object,
WorkingMemoryImpl workingMemory)
Assert a new fact object into this RuleBase and the
specified WorkingMemory . |
Declaration |
getDeclaration()
Retrieve the root fact object Declaration . |
Set |
getTupleDeclarations()
Retrieve the Set of Declaration s in the
propagated Tuples . |
TupleSink |
getTupleSink()
Retrieve the TupleSink that receives propagated
Tuples . |
(package private) void |
modifyObject(FactHandle handle,
Object newObject,
WorkingMemoryImpl workingMemory)
Modify a fact object in this RuleBase and the specified
WorkingMemory . |
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 . |
(package private) void |
retractObject(FactHandle handle,
WorkingMemoryImpl workingMemory)
Retract a fact object from this RuleBase and the specified
WorkingMemory . |
protected void |
setTupleSink(TupleSink tupleSink)
Set the TupleSink that receives Tuples
propagated from this TupleSource . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ParameterNode(ObjectTypeNode inputNode, Declaration declaration)
inputNode
- The ObjectTypeNode
input to this.declaration
- The root fact object Declaration
.Method Detail |
void assertObject(FactHandle handle, Object object, WorkingMemoryImpl workingMemory) throws AssertionException
RuleBase
and the
specified WorkingMemory
.
handle
- The fact handle.object
- The object to assert.workingMemory
- The working memory session.
AssertionException
- if an error occurs during assertion.void retractObject(FactHandle handle, WorkingMemoryImpl workingMemory) throws RetractionException
RuleBase
and the specified
WorkingMemory
.
handle
- The handle to the fact to retract.workingMemory
- The working memory session.
RetractionException
- if an error occurs during retraction.void modifyObject(FactHandle handle, Object newObject, WorkingMemoryImpl workingMemory) throws FactException
RuleBase
and the specified
WorkingMemory
.
With the exception of time-based nodes, modification of a fact object is
semantically equivelent to retracting and re-asserting it.
handle
- The fact handle.newObject
- The new fact value object.workingMemory
- The working memory session.
FactException
- if an error occurs during modification.public Declaration getDeclaration()
Declaration
.
Declaration
.public Set getTupleDeclarations()
Set
of Declaration
s in the
propagated Tuples
.
getTupleDeclarations
in class TupleSource
Set
of Declarations
in progated
Tuples
.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 |