Package org.drools.core.rule
Class BehaviorManager
- java.lang.Object
-
- org.drools.core.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
Fields Modifier and Type Field Description static Behavior[]NO_BEHAVIORS
-
Constructor Summary
Constructors Constructor Description BehaviorManager()BehaviorManager(List<Behavior> behaviors)BehaviorManager(Behavior[] behaviors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanassertFact(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(ObjectInput in)voidretractFact(Object behaviorContext, InternalFactHandle factHandle, PropagationContext pctx, ReteEvaluator reteEvaluator)Removes a newly asserted fact handle from the behaviors' contextvoidwriteExternal(ObjectOutput out)
-
-
-
Field Detail
-
NO_BEHAVIORS
public static final Behavior[] NO_BEHAVIORS
-
-
Method Detail
-
readExternal
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
- Specified by:
readExternalin interfaceExternalizable- Throws:
IOExceptionClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternalin interfaceExternalizable- Throws:
IOException
-
createBehaviorContext
public Behavior.Context[] createBehaviorContext()
Creates the behaviors' context
-
assertFact
public boolean assertFact(Object behaviorContext, InternalFactHandle factHandle, PropagationContext pctx, ReteEvaluator reteEvaluator)
Register a newly asserted right tuple into the behaviors' context
-
retractFact
public void retractFact(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
-
-