org.drools.rule
Class BehaviorManager

java.lang.Object
  extended by org.drools.rule.BehaviorManager
All Implemented Interfaces:
Externalizable, Serializable

public class BehaviorManager
extends Object
implements Externalizable

A class to encapsulate behavior management for a given beta node

See Also:
Serialized Form

Field Summary
static Behavior[] NO_BEHAVIORS
           
 
Constructor Summary
BehaviorManager()
           
BehaviorManager(Behavior[] behaviors)
           
 
Method Summary
 boolean assertRightTuple(PropagationContext pctx, Object behaviorContext, RightTuple rightTuple, InternalWorkingMemory workingMemory)
          Register a newly asserted right tuple into the behaviors' context
 Object createBehaviorContext()
          Creates the behaviors' context
 Behavior[] getBehaviors()
           
 void readExternal(ObjectInput in)
           
 void retractRightTuple(Object behaviorContext, RightTuple rightTuple, InternalWorkingMemory workingMemory)
          Removes a newly asserted right tuple from the behaviors' context
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_BEHAVIORS

public static final Behavior[] NO_BEHAVIORS
Constructor Detail

BehaviorManager

public BehaviorManager()

BehaviorManager

public BehaviorManager(Behavior[] behaviors)
Parameters:
behaviors -
Method Detail

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

createBehaviorContext

public Object createBehaviorContext()
Creates the behaviors' context

Returns:

assertRightTuple

public boolean assertRightTuple(PropagationContext pctx,
                                Object behaviorContext,
                                RightTuple rightTuple,
                                InternalWorkingMemory workingMemory)
Register a newly asserted right tuple into the behaviors' context

Parameters:
context -
tuple -
Returns:

retractRightTuple

public void retractRightTuple(Object behaviorContext,
                              RightTuple rightTuple,
                              InternalWorkingMemory workingMemory)
Removes a newly asserted right tuple from the behaviors' context

Parameters:
behaviorContext -
rightTuple -
workingMemory -

getBehaviors

public Behavior[] getBehaviors()
Returns:
the behaviors


Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.