Class ActiveResourceRegistry
- java.lang.Object
-
- edu.kit.ipd.sdq.eventsim.resources.ActiveResourceRegistry
-
public class ActiveResourceRegistry extends Object
-
-
Constructor Summary
Constructors Constructor Description ActiveResourceRegistry()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addResourceRegistrationListener(Consumer<SimActiveResource> listener)
void
finalise()
SimActiveResource
findOrCreateResource(org.palladiosimulator.pcm.resourceenvironment.ResourceContainer resourceContainer, org.palladiosimulator.pcm.resourcetype.ResourceType resourceType)
Finds the resource registered for the specified type and resource container, or creates the resource if none is registered.
-
-
-
Method Detail
-
addResourceRegistrationListener
public void addResourceRegistrationListener(Consumer<SimActiveResource> listener)
-
finalise
public void finalise()
-
findOrCreateResource
public SimActiveResource findOrCreateResource(org.palladiosimulator.pcm.resourceenvironment.ResourceContainer resourceContainer, org.palladiosimulator.pcm.resourcetype.ResourceType resourceType)
Finds the resource registered for the specified type and resource container, or creates the resource if none is registered. Created resources are added to the registry.- Parameters:
resourceContainer
- the resource containertype
- the resource type- Returns:
- the resource of the specified type
- Throws:
UnexpectedModelStructureException
- if the modeled resource container does not contain a resource specification of the requested type
-
-