Package edu.kit.ipd.sdq.eventsim.command
Interface ICommand<R,M>
-
- All Known Subinterfaces:
IPCMCommand<R>
- All Known Implementing Classes:
BuildComponentInstances,BuildResourceAllocation,BuildSimulatedResourceEnvironment,BuildWorkloadGenerator,FindActionInBehaviour,FindActionInUsageBehaviour,FindActionsInSeff,FindActionsInUsageScenario,FindAllActionsByType,FindAllPassiveResources,FindAllUserActionsByType,FindAssemblyContextForSystemCall,FindPassiveResourcesInAssemblyContext,FindSeffsForAssemblyContext,FindUsageScenarios,InstallExternalCallParameterHandling
public interface ICommand<R,M>Instances of this interface provide operations that require access to a certain model in order to produce the desired result. When executing such an operation, the required model is injected as a method parameter, which frees the operation implementation from caring about finding and loading the model.Operations implementing this interface are executed by an
ICommandExecutor.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancachable()Rexecute(M model, ICommandExecutor<M> executor)Executes the operation encapsulated by this class.
-
-
-
Method Detail
-
execute
R execute(M model, ICommandExecutor<M> executor)
Executes the operation encapsulated by this class.Notice: This method is not intended to be called by clients. Use a
ICommandExecutorinstead to execute the operation.- Parameters:
model- the modelexecutor- theICommandExecutorthat currently executes this operation. Use this reference to invoke sub-operations also implementing thisICommandinterface.- Returns:
-
cachable
boolean cachable()
- Returns:
- whether the command may be cached or not.
-
-