Interface FailureBehaviorChangingStrategy
- All Known Implementing Classes:
AbstractDemandModifyingBehaviorStrategy,AbstractPreInterpretationBehaviorStrategy,AddDemandModifyingBehaviorStrategy,AddPreInterpretationBehaviorStrategy,RemoveDemandModifyingBehaviorStrategy,RemovePreInterpretationBehaviorStrategy
public interface FailureBehaviorChangingStrategy
-
Method Summary
Modifier and TypeMethodDescriptionbooleanallocateContext(StrategyAllocationContext allocationContext) Allocate the strategies context.voidexecute()Executes the strategy.booleanisValid()Checks if the strategys context has been allocated.voidsetDecider(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()
-