Interface FailureBehaviorChangingStrategy
- All Known Implementing Classes:
AbstractDemandModifyingBehaviorStrategy
,AbstractPreInterpretationBehaviorStrategy
,AddDemandModifyingBehaviorStrategy
,AddPreInterpretationBehaviorStrategy
,RemoveDemandModifyingBehaviorStrategy
,RemovePreInterpretationBehaviorStrategy
public interface FailureBehaviorChangingStrategy
-
Method Summary
Modifier and TypeMethodDescriptionboolean
allocateContext
(StrategyAllocationContext allocationContext) Allocate the strategies context.void
execute()
Executes the strategy.boolean
isValid()
Checks if the strategys context has been allocated.void
setDecider
(BehavioralDecider decider) Sets a Decider to the Behavior.
-
Method Details
-
execute
void execute()Executes the strategy. Before, you should test if this call is possible by calling isValid(). -
isValid
boolean isValid()Checks if the strategys context has been allocated.- Returns:
- true if context is allocated.
-
setDecider
Sets a Decider to the Behavior.- Parameters:
decider
-
-
allocateContext
Allocate the strategies context.- Returns:
- Returns false if it was impossible to allocate the strategy.
-
getRevertedStrategy
FailureBehaviorChangingStrategy getRevertedStrategy()
-