Class ComplexComponent

  • Direct Known Subclasses:
    CompositeComponentCreator, SubSystemCreator

    public abstract class ComplexComponent
    extends Component
    This class provides the general infrastructure of a compositional component, i.e. CompositeComponent and SubSystem. It provides the implementation of the methods for creating assembly contexts, connectors and event channels.
    • Field Detail

      • assemblyContexts

        protected List<org.palladiosimulator.pcm.core.composition.AssemblyContext> assemblyContexts
      • connectors

        protected List<org.palladiosimulator.pcm.core.composition.Connector> connectors
      • eventChannels

        protected List<org.palladiosimulator.pcm.core.composition.EventChannel> eventChannels
      • resourceRequiredDelegationConnectors

        protected List<org.palladiosimulator.pcm.core.composition.ResourceRequiredDelegationConnector> resourceRequiredDelegationConnectors
    • Constructor Detail

      • ComplexComponent

        public ComplexComponent()
    • Method Detail

      • withAssemblyContext

        public ComplexComponent withAssemblyContext​(org.palladiosimulator.pcm.repository.RepositoryComponent encapsulatedComponent,
                                                    String name,
                                                    VariableUsageCreator... configParameterUsages)
        Creates an AssemblyContext with the name name and optionally many configParameterUsages and adds it to the component.

        An existing RepositoryComponent can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.fetchOfComponent(name).

        Parameters:
        encapsulatedComponent -
        name -
        configParameterUsages -
        Returns:
        the component in the making
        See Also:
        FluentRepositoryFactory.fetchOfComponent(String)
      • withAssemblyContext

        public ComplexComponent withAssemblyContext​(org.palladiosimulator.pcm.repository.RepositoryComponent encapsulatedComponent,
                                                    VariableUsageCreator... configParameterUsages)
        Creates an AssemblyContext and optionally many configParameterUsages and adds it to the component.

        An existing RepositoryComponent can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.fetchOfComponent(name).

        Parameters:
        encapsulatedComponent -
        name -
        configParameterUsages -
        Returns:
        the component in the making
        See Also:
        FluentRepositoryFactory.fetchOfComponent(String)
      • withEventChannel

        public ComplexComponent withEventChannel​(org.palladiosimulator.pcm.repository.EventGroup eventGroup,
                                                 String name)
        Creates a new EventChannel with name name.

        Event channels consist of an EventGroup and arbitrarily many EventChannelSinkConnectors and EventChannelSinkConnectors that are added when creating the connectors.

        Parameters:
        eventGroup -
        name -
        Returns:
        the component in the making
        See Also:
        FluentRepositoryFactory.fetchOfEventGroup(String)
      • withEventChannel

        public ComplexComponent withEventChannel​(org.palladiosimulator.pcm.repository.EventGroup eventGroup)
        Creates a new EventChannel.

        Event channels consist of an EventGroup and arbitrarily many EventChannelSinkConnectors and EventChannelSinkConnectors that are added when creating the connectors. However, that required the specification of a name for the event channel.

        Parameters:
        eventGroup -
        Returns:
        the component in the making
        See Also:
        FluentRepositoryFactory.fetchOfEventGroup(String)
      • withAssemblyConnection

        public ComplexComponent withAssemblyConnection​(org.palladiosimulator.pcm.repository.OperationProvidedRole providedRole,
                                                       org.palladiosimulator.pcm.core.composition.AssemblyContext providingAssemblyContext,
                                                       org.palladiosimulator.pcm.repository.OperationRequiredRole requiredRole,
                                                       org.palladiosimulator.pcm.core.composition.AssemblyContext requiringAssemblyContext)
        Creates an AssemblyConnector and adds it to the component.

        An AssemblyConnector is a bidirectional link of two assembly contexts. Intuitively, an AssemblyConnector connects a provided and a required interface of two different components. AssemblyContext must refer to the tuple (Role, AssemblyContext) in order to uniquely identify which component roles communicate with each other.

        Existing roles and assembly contexts can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory.

        Parameters:
        providedRole -
        providingAssemblyContext -
        requiredRole -
        requiringAssemblyContext -
        Returns:
        the component in the making
        See Also:
        FluentRepositoryFactory.fetchOfAssemblyContext(String), FluentRepositoryFactory.fetchOfOperationProvidedRole(String), FluentRepositoryFactory.fetchOfOperationRequiredRole(String)
      • withProvidedDelegationConnection

        public ComplexComponent withProvidedDelegationConnection​(org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext,
                                                                 org.palladiosimulator.pcm.repository.OperationProvidedRole innerProvidedRole,
                                                                 org.palladiosimulator.pcm.repository.OperationProvidedRole outerProvidedRole)
        Creates a ProvidedDelegationConnector and adds it to the component.

        A ProvidedDelegationConnector delegates incoming calls of provided roles to inner provided roles of encapsulated assembly contexts.

        Existing roles and assembly contexts can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory.

        Parameters:
        assemblyContext -
        innerProvidedRole -
        outerProvidedRole -
        Returns:
        the component in the making
        See Also:
        FluentRepositoryFactory.fetchOfAssemblyContext(String), FluentRepositoryFactory.fetchOfOperationProvidedRole(String)
      • withRequiredDelegationConnection

        public ComplexComponent withRequiredDelegationConnection​(org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext,
                                                                 org.palladiosimulator.pcm.repository.OperationRequiredRole innerRequiredRole,
                                                                 org.palladiosimulator.pcm.repository.OperationRequiredRole outerRequiredRole)
        Creates a RequiredDelegationConnector and adds it to the component.

        A RequiredDelegationConnector delegates required roles of encapsulated assembly contexts to outer required roles .

        Existing roles and assembly contexts can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory.

        Parameters:
        assemblyContext -
        innerRequiredRole -
        outerRequiredRole -
        Returns:
        the component in the making
        See Also:
        FluentRepositoryFactory.fetchOfAssemblyContext(String), FluentRepositoryFactory.fetchOfOperationRequiredRole(String)
      • withAssemblyEventConnection

        public ComplexComponent withAssemblyEventConnection​(org.palladiosimulator.pcm.repository.SinkRole sinkRole,
                                                            org.palladiosimulator.pcm.core.composition.AssemblyContext sinkAssemblyContext,
                                                            org.palladiosimulator.pcm.repository.SourceRole sourceRole,
                                                            org.palladiosimulator.pcm.core.composition.AssemblyContext sourceAssemblyContext,
                                                            String filterConditionStochasticExpression)
        Creates an AssemblyEventConnector and adds it to the component.

        An AssemblyConnector is a bidirectional link of two assembly contexts. Intuitively, an AssemblyEventConnector connects a sink and a source. AssemblyContext must refer to the tuple (Role,AssemblyContext) in order to uniquely identify which component sink and source roles communicate with each other.

        Existing roles and assembly contexts can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory.

        Parameters:
        sinkRole -
        sinkAssemblyContext -
        sourceRole -
        sourceAssemblyContext -
        filterConditionStochasticExpression -
        Returns:
        the component in the making
        See Also:
        FluentRepositoryFactory.fetchOfAssemblyContext(String), FluentRepositoryFactory.fetchOfSinkRole(String), FluentRepositoryFactory.fetchOfSourceRole(String)
      • withSinkDelegationConnection

        public ComplexComponent withSinkDelegationConnection​(org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext,
                                                             org.palladiosimulator.pcm.repository.SinkRole innerSinkRole,
                                                             org.palladiosimulator.pcm.repository.SinkRole outerSinkRole)
        Creates a SinkDelegationConnector and adds it to the component.

        A SinkDelegationConnector delegates an incoming event to the encapsulated assembly contexts to inner sink roles.

        Existing roles and assembly contexts can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory.

        Parameters:
        assemblyContext -
        innerSinkRole -
        outerSinkRole -
        Returns:
        the component in the making
        See Also:
        FluentRepositoryFactory.fetchOfAssemblyContext(String), FluentRepositoryFactory.fetchOfSinkRole(String)
      • withSourceDelegationConnection

        public ComplexComponent withSourceDelegationConnection​(org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext,
                                                               org.palladiosimulator.pcm.repository.SourceRole innerSourceRole,
                                                               org.palladiosimulator.pcm.repository.SourceRole outerSourceRole)
        Creates a SourceDelegationConnector and adds it to the component.

        A SourceDelegationConnector delegates outgoing events of encapsulated assembly contexts to an external souce role of the enclosing assembly context.

        Existing roles and assembly contexts can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory.

        Parameters:
        assemblyContext -
        innerSourceRole -
        outerSourceRole -
        Returns:
        the component in the making
        See Also:
        FluentRepositoryFactory.fetchOfAssemblyContext(String), FluentRepositoryFactory.fetchOfSourceRole(String)
      • withProvidedInfrastructureDelegationConnection

        public ComplexComponent withProvidedInfrastructureDelegationConnection​(org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext,
                                                                               org.palladiosimulator.pcm.repository.InfrastructureProvidedRole innerProvidedRole,
                                                                               org.palladiosimulator.pcm.repository.InfrastructureProvidedRole outerProvidedRole)
        Creates a ProvidedInfrastructureDelegationConnector and adds it to the component.

        Existing roles and assembly contexts can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory.

        Parameters:
        assemblyContext -
        innerProvidedRole -
        outerProvidedRole -
        Returns:
        the component in the making
        See Also:
        FluentRepositoryFactory.fetchOfAssemblyContext(String), FluentRepositoryFactory.fetchOfInfrastructureProvidedRole(String)
      • withRequiredInfrastructureDelegationConnection

        public ComplexComponent withRequiredInfrastructureDelegationConnection​(org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext,
                                                                               org.palladiosimulator.pcm.repository.InfrastructureRequiredRole innerRequiredRole,
                                                                               org.palladiosimulator.pcm.repository.InfrastructureRequiredRole outerRequiredRole)
        Creates a RequiredInfrastructureDelegationConnector and adds it to the component.

        Existing roles and assembly contexts can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory.

        Parameters:
        assemblyContext -
        innerRequiredRole -
        outerRequiredRole -
        Returns:
        the component in the making
        See Also:
        FluentRepositoryFactory.fetchOfAssemblyContext(String), FluentRepositoryFactory.fetchOfInfrastructureRequiredRole(String)
      • withRequiredResourceDelegationConnection

        public ComplexComponent withRequiredResourceDelegationConnection​(org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyContext,
                                                                         org.palladiosimulator.pcm.core.entity.ResourceRequiredRole innerRequiredRole,
                                                                         org.palladiosimulator.pcm.core.entity.ResourceRequiredRole outerRequiredRole)
        Creates a RequiredResourceDelegationConnector and adds it to the component.

        Existing roles and assembly contexts can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory.

        Parameters:
        assemblyContext -
        innerRequiredRole -
        outerRequiredRole -
        Returns:
        the component in the making
        See Also:
        FluentRepositoryFactory.fetchOfAssemblyContext(String), FluentRepositoryFactory.fetchOfResourceRequiredRole(String)
      • resourceRequiredDegelationConnection

        public ComplexComponent resourceRequiredDegelationConnection​(org.palladiosimulator.pcm.core.entity.ResourceRequiredRole innerRequiredRole,
                                                                     org.palladiosimulator.pcm.core.entity.ResourceRequiredRole outerRequiredRole)
        Creates a ResourceRequiredDelegationConnector and adds it to the component.

        Existing required roles can be fetched from the repository using the org.palladiosimulator.generator.fluent.component.factory, i.e. create.fetchOfResourceRequiredRole(name).

        Parameters:
        innerRequiredRole -
        outerRequiredRole -
        Returns:
        the component in the making
        See Also:
        FluentRepositoryFactory.fetchOfResourceRequiredRole(String)
      • addEventChannel

        protected void addEventChannel​(org.palladiosimulator.pcm.core.composition.EventChannel eventChannel)