Class AllocationContextCreator


public class AllocationContextCreator extends AllocationEntity
This class constructs an AllocationContext. Either an AssemblyContext or an EventChannel is allocated to a ResourceContainer.
See Also:
  • AllocationContext
  • Constructor Details

    • AllocationContextCreator

      public AllocationContextCreator(AllocationCreator allocationCreator)
  • Method Details

    • withAssemblyContext

      public AllocationContextCreator withAssemblyContext(org.palladiosimulator.pcm.core.composition.AssemblyContext context)
      Defines the AssemblyContext that is allocated to the ResourceContainer.
      Parameters:
      context -
      Returns:
      this AllocationContext
      See Also:
      • AssemblyContext
    • withAssemblyContext

      public AllocationContextCreator withAssemblyContext(String name) throws IllegalArgumentException
      Defines the AssemblyContext that is allocated to the ResourceContainer. The System used for the org.palladiosimulator.generator.fluent.allocation is searched for an AssemblyContext with the given name.
      Parameters:
      name -
      Returns:
      this AllocationContext
      Throws:
      IllegalArgumentException - Thrown if no AssemblyContext with the given name exists
      See Also:
      • AssemblyContext
    • withEventChannel

      public AllocationContextCreator withEventChannel(org.palladiosimulator.pcm.core.composition.EventChannel channel)
      Defines the EventChannel that is allocated to the ResourceContainer.
      Parameters:
      context -
      Returns:
      this AllocationContext
      See Also:
      • EventChannel
    • withEventChannel

      public AllocationContextCreator withEventChannel(String name) throws IllegalArgumentException
      Defines the EventChannel that is allocated to the ResourceContainer. The System used for the org.palladiosimulator.generator.fluent.allocation is searched for an EventChannel with the given name.
      Parameters:
      name -
      Returns:
      this AllocationContext
      Throws:
      IllegalArgumentException - Thrown if no EventChannel with the given name exists
      See Also:
      • EventChannel
    • withResourceContainer

      public AllocationContextCreator withResourceContainer(org.palladiosimulator.pcm.resourceenvironment.ResourceContainer container)
      Defines the ResourceContainer, the AssemblyContext or EventChannel is allocated to.
      Parameters:
      container -
      Returns:
      this AllocationContext
      See Also:
      • ResourceContainer
    • withResourceContainer

      public AllocationContextCreator withResourceContainer(String name) throws IllegalArgumentException
      Defines the ResourceContainer, the AssemblyContext or EventChannel is allocated to. The ResourceEnvironment used for the org.palladiosimulator.generator.fluent.allocation is searched for a ResourceContainer with the given name.
      Parameters:
      container -
      Returns:
      this AllocationContext
      Throws:
      IllegalArgumentException - Thrown if no ResourceContainer with the given name exists
      See Also:
      • ResourceContainer
    • build

      protected org.palladiosimulator.pcm.allocation.AllocationContext build()
      Description copied from class: Entity
      Turns the entity in the making into the finished entity.
      Specified by:
      build in class Entity
      Returns:
      the finished entity
    • withName

      public AllocationContextCreator withName(String name)
      Description copied from class: Entity
      Defines the unique name of this current entity. Once created entities are referenced by this name. Only entities with a unique name can be fetched from the model.
      Overrides:
      withName in class Entity
      Returns:
      this current entity in the making