站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > JBoss RULES 4.0.0.11754MR2 API 英文版文档

RightInputAdapterNode (Drools 4.0.0.11754MR2 API) - JBoss RULES 4.0.0.11754MR2 API 英文版文档


org.drools.reteoo
Class RightInputAdapterNode

java.lang.Object
  extended by org.drools.common.BaseNode
      extended by org.drools.reteoo.ObjectSource
          extended by org.drools.reteoo.RightInputAdapterNode
All Implemented Interfaces:
Serializable, NetworkNode, NodeMemory, TupleSink

public class RightInputAdapterNode
extends ObjectSource
implements TupleSink, NodeMemory

When joining a subnetwork into the main network again, RightInputAdapterNode adapts the subnetwork's tuple into a fact in order right join it with the tuple being propagated in the main network.

Author:
Mark Proctor, Bob McWhirter, Edson Tirelli
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.drools.reteoo.ObjectSource
objectSource, sink
 
Fields inherited from class org.drools.common.BaseNode
hasMemory, id, sharedCount
 
Constructor Summary
RightInputAdapterNode(int id, TupleSource source)
          Constructor specifying the unique id of the node in the Rete network, the position of the propagating FactHandleImpl in ReteTuple and the source that propagates the receive ReteTuples.
 
Method Summary
 void assertTuple(ReteTuple tuple, PropagationContext context, InternalWorkingMemory workingMemory)
          Takes the asserted ReteTuple received from the TupleSource and adapts it into a FactHandleImpl
 void attach()
          Attaches the node into the network.
 void attach(InternalWorkingMemory[] workingMemories)
           
 Object createMemory(RuleBaseConfiguration config)
          Creates and return the node memory
 void remove(BaseNode node, InternalWorkingMemory[] workingMemories)
          Removes the node from teh network.
 void retractTuple(ReteTuple tuple, PropagationContext context, InternalWorkingMemory workingMemory)
          Retracts the corresponding tuple by retrieving and retracting the fact created for it
 void updateSink(ObjectSink sink, PropagationContext context, InternalWorkingMemory workingMemory)
           
 
Methods inherited from class org.drools.reteoo.ObjectSource
addObjectSink, getSinkPropagator, removeObjectSink
 
Methods inherited from class org.drools.common.BaseNode
addShare, getId, getSharedCount, hashCode, hasMemory, isInUse, isShared, removeShare, setHasMemory, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.drools.common.NodeMemory
getId
 

Constructor Detail

RightInputAdapterNode

public RightInputAdapterNode(int id,
                             TupleSource source)
Constructor specifying the unique id of the node in the Rete network, the position of the propagating FactHandleImpl in ReteTuple and the source that propagates the receive ReteTuples.

Parameters:
id - Unique id
source - The TupleSource which propagates the received ReteTuple
Method Detail

createMemory

public Object createMemory(RuleBaseConfiguration config)
Creates and return the node memory

Specified by:
createMemory in interface NodeMemory

assertTuple

public void assertTuple(ReteTuple tuple,
                        PropagationContext context,
                        InternalWorkingMemory workingMemory)
Takes the asserted ReteTuple received from the TupleSource and adapts it into a FactHandleImpl

Specified by:
assertTuple in interface TupleSink
Parameters:
tuple - The asserted ReteTuple.
context - The PropagationContext of the WorkingMemory action.
workingMemory - the WorkingMemory session.

retractTuple

public void retractTuple(ReteTuple tuple,
                         PropagationContext context,
                         InternalWorkingMemory workingMemory)
Retracts the corresponding tuple by retrieving and retracting the fact created for it

Specified by:
retractTuple in interface TupleSink

attach

public void attach()
Description copied from class: BaseNode
Attaches the node into the network. Usually to the parent ObjectSource or TupleSource

Specified by:
attach in class BaseNode

attach

public void attach(InternalWorkingMemory[] workingMemories)
Specified by:
attach in class BaseNode

updateSink

public void updateSink(ObjectSink sink,
                       PropagationContext context,
                       InternalWorkingMemory workingMemory)
Specified by:
updateSink in class ObjectSource

remove

public void remove(BaseNode node,
                   InternalWorkingMemory[] workingMemories)
Description copied from class: BaseNode
Removes the node from teh network. Usually from the parent ObjectSource or TupleSource

Specified by:
remove in class BaseNode


Copyright © 2001-2007 JBoss Inc.. All Rights Reserved.