Class ComponentInstance
- java.lang.Object
-
- edu.kit.ipd.sdq.eventsim.system.staticstructure.ComponentInstance
-
public class ComponentInstance extends Object
A component instance is an instance of a component type (e.g. a BasicComponent). Component types are instantiated by putting them into their contexts:- the
AssemblyContextdefines how the component instance is wired with other component instances - the
AllocationContextspecifies the deployment of the component, i.e. on which resource container the component instance is to be executed - the UsageContext specifies the component usage, which includes the component's parameter characterisations
UsageContext, however, it suffices to specify the component parameter characterisation.Once created, a component instance gives convenient access to its contexts:
- AssemblyContext:
findProvidingComponent() - AllocationContext:
getResourceContainer() - UsageContext:
getComponentParameters()
- the
-
-
Constructor Summary
Constructors Constructor Description ComponentInstance(org.palladiosimulator.pcm.repository.BasicComponent type, org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyCtx, SimulatedResourceContainer deployedOn, de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object> parameters)Constructs a new component instance by specifying the three contexts as described in the class-level documentation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.palladiosimulator.pcm.core.composition.AssemblyContextgetAssemblyCtx()Returns the AssemblyContext that encapsulates this component instance.de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object>getComponentParameters()RoleInstancegetProvidedRole(org.palladiosimulator.pcm.repository.OperationProvidedRole role)ComponentInstancegetProvidingComponent(org.palladiosimulator.pcm.repository.OperationSignature signature)RoleInstancegetRequiredRole(org.palladiosimulator.pcm.repository.OperationRequiredRole role)SimulatedResourceContainergetResourceContainer()org.palladiosimulator.pcm.seff.ResourceDemandingSEFFgetServiceEffectSpecification(org.palladiosimulator.pcm.repository.OperationSignature signature)
-
-
-
Constructor Detail
-
ComponentInstance
public ComponentInstance(org.palladiosimulator.pcm.repository.BasicComponent type, org.palladiosimulator.pcm.core.composition.AssemblyContext assemblyCtx, SimulatedResourceContainer deployedOn, de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object> parameters)Constructs a new component instance by specifying the three contexts as described in the class-level documentation.- Parameters:
model- the simulation modeltype- the component type that is to be instantiated
-
-
Method Detail
-
getProvidedRole
public RoleInstance getProvidedRole(org.palladiosimulator.pcm.repository.OperationProvidedRole role)
- Parameters:
role- the role type- Returns:
- the role instance for the specified role type
-
getRequiredRole
public RoleInstance getRequiredRole(org.palladiosimulator.pcm.repository.OperationRequiredRole role)
- Parameters:
role- the role type- Returns:
- the role instance for the specified role type
-
getProvidingComponent
public ComponentInstance getProvidingComponent(org.palladiosimulator.pcm.repository.OperationSignature signature)
- Parameters:
signature- the call's signature- Returns:
- the component instance that provides a call with the specified signature to this component instance
-
getAssemblyCtx
public org.palladiosimulator.pcm.core.composition.AssemblyContext getAssemblyCtx()
Returns the AssemblyContext that encapsulates this component instance.- Returns:
- the AssemblyContext of this component instance
-
getServiceEffectSpecification
public org.palladiosimulator.pcm.seff.ResourceDemandingSEFF getServiceEffectSpecification(org.palladiosimulator.pcm.repository.OperationSignature signature)
- Parameters:
signature- the signature- Returns:
- the service effect specification of the specified signature
-
getComponentParameters
public de.uka.ipd.sdq.simucomframework.variables.stackframe.SimulatedStackframe<Object> getComponentParameters()
- Returns:
- the parameter characterisations for the parameters of this component instance
-
getResourceContainer
public SimulatedResourceContainer getResourceContainer()
- Returns:
- the resource container in which the component instance is deployed
-
-