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 eachBasicComponent
encapsulated in anAssemblyContext
. The roles of the created components are connected in accordance with theSystem
model.
-
-
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 boolean
cachable()
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
ICommandExecutor
instead to execute the operation.- Specified by:
execute
in interfaceICommand<Map<String,ComponentInstance>,PCMModel>
- Parameters:
pcm
- the modelexecutor
- theICommandExecutor
that currently executes this operation. Use this reference to invoke sub-operations also implementing thisICommand
interface.- Returns:
-
-