Class TransientEffectExecutionResult
- java.lang.Object
-
- org.palladiosimulator.simulizar.action.interpreter.TransientEffectExecutionResult
-
public final class TransientEffectExecutionResult extends Object
Class to represent the result of the execution of transient effects, i.e.,AdaptationBehaviors. Instances of this class are created by theTransientEffectInterpreterin the course of itsTransientEffectInterpreter.caseAdaptationBehavior(AdaptationBehavior)method. Note that in case of an asynchronous execution of the behavior, the meaningfulness is limited since the execution is only triggered. Hence, in such a case the corresponding result only contains information on this.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Optional<ExecutionContext>getContext()Gets the execution context that was used to execute the behavior.EventResultgetExecutionResult()Gets the execution result.booleangetExecutionResultAsBoolean()Gets the execution result in terms of a boolean flag.
-
-
-
Method Detail
-
getExecutionResult
public EventResult getExecutionResult()
Gets the execution result.- Returns:
- The result of the execution of the behavior, in terms of a
EventResultconstant.
If this instance is associated with an asynchronous behavior execution,SUCCESSFULis returned in any case.
-
getContext
public Optional<ExecutionContext> getContext()
Gets the execution context that was used to execute the behavior. This is mainly of interest in case of an asynchronous execution.- Returns:
- The
ExecutionContextthat was used to execute the behavior.
-
getExecutionResultAsBoolean
public boolean getExecutionResultAsBoolean()
Gets the execution result in terms of a boolean flag. This is only meaningful in case of a synchronous behavior execution.- Returns:
truein case of success, elsefalse.
-
-