public interface Behavior extends RuleComponent, Cloneable
Modifier and Type | Interface and Description |
---|---|
static class |
Behavior.BehaviorType |
Modifier and Type | Field and Description |
---|---|
static Behavior[] |
EMPTY_BEHAVIOR_LIST |
Modifier and Type | Method and Description |
---|---|
boolean |
assertFact(Object context,
InternalFactHandle fact,
PropagationContext pctx,
InternalWorkingMemory workingMemory)
Makes the behavior aware of the new fact entering behavior's scope
|
Object |
createContext()
Creates the context object associated with this behavior.
|
void |
expireFacts(Object context,
PropagationContext pctx,
InternalWorkingMemory workingMemory)
A callback method that allows behaviors to expire facts
|
long |
getExpirationOffset()
Some behaviors might change the expiration offset for the
associated fact type.
|
Behavior.BehaviorType |
getType()
Returns the type of the behavior
|
void |
retractFact(Object context,
InternalFactHandle fact,
PropagationContext pctx,
InternalWorkingMemory workingMemory)
Removes a right tuple from the behavior's scope
|
static final Behavior[] EMPTY_BEHAVIOR_LIST
Behavior.BehaviorType getType()
Object createContext()
boolean assertFact(Object context, InternalFactHandle fact, PropagationContext pctx, InternalWorkingMemory workingMemory)
context
- The behavior context objectfact
- The new fact entering behavior's scopeworkingMemory
- The working memory session referencevoid retractFact(Object context, InternalFactHandle fact, PropagationContext pctx, InternalWorkingMemory workingMemory)
context
- The behavior context objectfact
- The fact leaving the behavior's scopeworkingMemory
- The working memory session referencevoid expireFacts(Object context, PropagationContext pctx, InternalWorkingMemory workingMemory)
long getExpirationOffset()
Copyright © 2001-2015 JBoss by Red Hat. All Rights Reserved.