Package org.drools.core.rule
Class BehaviorManager
- java.lang.Object
-
- org.drools.core.rule.BehaviorManager
-
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable
public class BehaviorManager extends java.lang.Object implements java.io.ExternalizableA class to encapsulate behavior management for a given beta node- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static Behavior[]NO_BEHAVIORS
-
Constructor Summary
Constructors Constructor Description BehaviorManager()BehaviorManager(java.util.List<Behavior> behaviors)BehaviorManager(Behavior[] behaviors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanassertFact(java.lang.Object behaviorContext, InternalFactHandle factHandle, PropagationContext pctx, ReteEvaluator reteEvaluator)Register a newly asserted right tuple into the behaviors' contextBehavior.Context[]createBehaviorContext()Creates the behaviors' contextBehavior[]getBehaviors()voidreadExternal(java.io.ObjectInput in)voidretractFact(java.lang.Object behaviorContext, InternalFactHandle factHandle, PropagationContext pctx, ReteEvaluator reteEvaluator)Removes a newly asserted fact handle from the behaviors' contextvoidwriteExternal(java.io.ObjectOutput out)
-
-
-
Field Detail
-
NO_BEHAVIORS
public static final Behavior[] NO_BEHAVIORS
-
-
Method Detail
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException
-
createBehaviorContext
public Behavior.Context[] createBehaviorContext()
Creates the behaviors' context
-
assertFact
public boolean assertFact(java.lang.Object behaviorContext, InternalFactHandle factHandle, PropagationContext pctx, ReteEvaluator reteEvaluator)Register a newly asserted right tuple into the behaviors' context
-
retractFact
public void retractFact(java.lang.Object behaviorContext, InternalFactHandle factHandle, PropagationContext pctx, ReteEvaluator reteEvaluator)Removes a newly asserted fact handle from the behaviors' context
-
getBehaviors
public Behavior[] getBehaviors()
- Returns:
- the behaviors
-
-