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 boolean
assertFact(Object behaviorContext, InternalFactHandle factHandle, PropagationContext pctx, InternalWorkingMemory workingMemory)
Register a newly asserted right tuple into the behaviors' contextBehavior.Context[]
createBehaviorContext()
Creates the behaviors' contextBehavior[]
getBehaviors()
void
readExternal(ObjectInput in)
void
retractFact(Object behaviorContext, InternalFactHandle factHandle, PropagationContext pctx, InternalWorkingMemory workingMemory)
Removes a newly asserted fact handle from the behaviors' contextvoid
writeExternal(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:
readExternal
in interfaceExternalizable
- Throws:
IOException
ClassNotFoundException
-
writeExternal
public void writeExternal(ObjectOutput out) throws IOException
- Specified by:
writeExternal
in interfaceExternalizable
- Throws:
IOException
-
createBehaviorContext
public Behavior.Context[] createBehaviorContext()
Creates the behaviors' context
-
assertFact
public boolean assertFact(Object behaviorContext, InternalFactHandle factHandle, PropagationContext pctx, InternalWorkingMemory workingMemory)
Register a newly asserted right tuple into the behaviors' context
-
retractFact
public void retractFact(Object behaviorContext, InternalFactHandle factHandle, PropagationContext pctx, InternalWorkingMemory workingMemory)
Removes a newly asserted fact handle from the behaviors' context
-
getBehaviors
public Behavior[] getBehaviors()
- Returns:
- the behaviors
-
-