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
Modifier and TypeFieldDescriptionprotected org.palladiosimulator.simulizar.interpreter.preinterpretation.PreInterpretationBehavior
protected org.palladiosimulator.simulizar.interpreter.preinterpretation.PreInterpretationBehaviorContainer
-
Constructor Summary
ConstructorDescriptionAbstractPreInterpretationBehaviorStrategy
(org.palladiosimulator.simulizar.interpreter.preinterpretation.PreInterpretationBehaviorContainer pIBContainer, org.palladiosimulator.simulizar.interpreter.preinterpretation.PreInterpretationBehavior behavior) -
Method Summary
Modifier and TypeMethodDescriptionboolean
allocateContext
(StrategyAllocationContext allocationContext) Allocate the strategies context.abstract void
execute()
Executes the strategy.abstract FailureBehaviorChangingStrategy
boolean
isValid()
Checks if the strategys context has been allocated.void
setDecider
(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:FailureBehaviorChangingStrategy
Executes the strategy. Before, you should test if this call is possible by calling isValid().- Specified by:
execute
in interfaceFailureBehaviorChangingStrategy
-
getRevertedStrategy
- Specified by:
getRevertedStrategy
in interfaceFailureBehaviorChangingStrategy
-
setDecider
Description copied from interface:FailureBehaviorChangingStrategy
Sets a Decider to the Behavior.- Specified by:
setDecider
in interfaceFailureBehaviorChangingStrategy
-
isValid
public boolean isValid()Description copied from interface:FailureBehaviorChangingStrategy
Checks if the strategys context has been allocated.- Specified by:
isValid
in interfaceFailureBehaviorChangingStrategy
- Returns:
- true if context is allocated.
-
allocateContext
Description copied from interface:FailureBehaviorChangingStrategy
Allocate the strategies context.- Specified by:
allocateContext
in interfaceFailureBehaviorChangingStrategy
- Returns:
- Returns false if it was impossible to allocate the strategy.
-