Class BuildComponentInstances
- java.lang.Object
-
- edu.kit.ipd.sdq.eventsim.system.command.BuildComponentInstances
-
- All Implemented Interfaces:
ICommand<Map<String,ComponentInstance>,PCMModel>,IPCMCommand<Map<String,ComponentInstance>>
public class BuildComponentInstances extends Object implements IPCMCommand<Map<String,ComponentInstance>>
This command creates a component instance for eachBasicComponentencapsulated in anAssemblyContext. The roles of the created components are connected in accordance with theSystemmodel.
-
-
Constructor Summary
Constructors Constructor Description BuildComponentInstances(AllocationRegistry allocation)Constructs a new command that creates component instances.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancachable()Map<String,ComponentInstance>execute(PCMModel pcm, ICommandExecutor<PCMModel> executor)Executes the operation encapsulated by this class.
-
-
-
Constructor Detail
-
BuildComponentInstances
public BuildComponentInstances(AllocationRegistry allocation)
Constructs a new command that creates component instances. The components' AllocationContexts are contained in passed allocation registry.- Parameters:
model- the simulation modelallocation- the allocation registry
-
-
Method Detail
-
execute
public Map<String,ComponentInstance> execute(PCMModel pcm, ICommandExecutor<PCMModel> 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.- Specified by:
executein interfaceICommand<Map<String,ComponentInstance>,PCMModel>- Parameters:
pcm- the modelexecutor- theICommandExecutorthat currently executes this operation. Use this reference to invoke sub-operations also implementing thisICommandinterface.- Returns:
-
-