Class SimulatedResourceEnvironment


  • public class SimulatedResourceEnvironment
    extends Object
    This class serves a registry for SimulatedResourceContainers by mapping resource container specifications to resource container instances. In this way, it represents the resource environment of a PCM model.

    Notice the distinction between container specifications and container instances:

    See Also:
    BuildSimulatedResourceEnvironment
    • Constructor Detail

      • SimulatedResourceEnvironment

        public SimulatedResourceEnvironment()
        Constructs a new registry for SimulatedResourceContainers which represents the resource environment.
    • Method Detail

      • registerResourceContainer

        public void registerResourceContainer​(org.palladiosimulator.pcm.resourceenvironment.ResourceContainer specification,
                                              SimulatedResourceContainer instance)
        Registers a SimulatedResourceContainer by mapping the given resource container specification to the specified resource container instance.
        Parameters:
        specification - the resource container specification
        instance - the resource container instance
      • getResourceContainer

        public SimulatedResourceContainer getResourceContainer​(org.palladiosimulator.pcm.resourceenvironment.ResourceContainer specification)
        Returns the resource container instance for the given resource container specification
        Parameters:
        specification - the resource container specification
        Returns:
        the resource container instance for the passed specification
      • getResourceContainers

        public List<SimulatedResourceContainer> getResourceContainers()
        Returns all resource container instances, which has been added before.
        Returns:
        a list of all resource container instances