Class AbstractPreInterpretationBehaviorStrategy
java.lang.Object
org.palladiosimulator.simulizar.failurescenario.interpreter.strategies.AbstractPreInterpretationBehaviorStrategy
- All Implemented Interfaces:
FailureBehaviorChangingStrategy
- Direct Known Subclasses:
AddPreInterpretationBehaviorStrategy,RemovePreInterpretationBehaviorStrategy
public abstract class AbstractPreInterpretationBehaviorStrategy
extends Object
implements FailureBehaviorChangingStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.palladiosimulator.simulizar.interpreter.preinterpretation.PreInterpretationBehaviorprotected org.palladiosimulator.simulizar.interpreter.preinterpretation.PreInterpretationBehaviorContainer -
Constructor Summary
ConstructorsConstructorDescriptionAbstractPreInterpretationBehaviorStrategy(org.palladiosimulator.simulizar.interpreter.preinterpretation.PreInterpretationBehaviorContainer pIBContainer, org.palladiosimulator.simulizar.interpreter.preinterpretation.PreInterpretationBehavior behavior) -
Method Summary
Modifier and TypeMethodDescriptionbooleanallocateContext(StrategyAllocationContext allocationContext) Allocate the strategies context.abstract voidexecute()Executes the strategy.abstract FailureBehaviorChangingStrategybooleanisValid()Checks if the strategys context has been allocated.voidsetDecider(BehavioralDecider decider) Sets a Decider to the Behavior.
-
Field Details
-
pIBContainer
protected org.palladiosimulator.simulizar.interpreter.preinterpretation.PreInterpretationBehaviorContainer pIBContainer -
behavior
protected org.palladiosimulator.simulizar.interpreter.preinterpretation.PreInterpretationBehavior behavior
-
-
Constructor Details
-
AbstractPreInterpretationBehaviorStrategy
public AbstractPreInterpretationBehaviorStrategy(org.palladiosimulator.simulizar.interpreter.preinterpretation.PreInterpretationBehaviorContainer pIBContainer, org.palladiosimulator.simulizar.interpreter.preinterpretation.PreInterpretationBehavior behavior)
-
-
Method Details
-
execute
public abstract void execute()Description copied from interface:FailureBehaviorChangingStrategyExecutes the strategy. Before, you should test if this call is possible by calling isValid().- Specified by:
executein interfaceFailureBehaviorChangingStrategy
-
getRevertedStrategy
- Specified by:
getRevertedStrategyin interfaceFailureBehaviorChangingStrategy
-
setDecider
Description copied from interface:FailureBehaviorChangingStrategySets a Decider to the Behavior.- Specified by:
setDeciderin interfaceFailureBehaviorChangingStrategy
-
isValid
public boolean isValid()Description copied from interface:FailureBehaviorChangingStrategyChecks if the strategys context has been allocated.- Specified by:
isValidin interfaceFailureBehaviorChangingStrategy- Returns:
- true if context is allocated.
-
allocateContext
Description copied from interface:FailureBehaviorChangingStrategyAllocate the strategies context.- Specified by:
allocateContextin interfaceFailureBehaviorChangingStrategy- Returns:
- Returns false if it was impossible to allocate the strategy.
-