Class EventSimActiveResourceModel
- java.lang.Object
-
- edu.kit.ipd.sdq.eventsim.resources.EventSimActiveResourceModel
-
- All Implemented Interfaces:
IActiveResource
public class EventSimActiveResourceModel extends Object implements IActiveResource
-
-
Constructor Summary
Constructors Constructor Description EventSimActiveResourceModel(ISimulationMiddleware middleware)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
consume(IRequest request, org.palladiosimulator.pcm.resourceenvironment.ResourceContainer resourceContainer, org.palladiosimulator.pcm.resourcetype.ResourceType resourceType, double absoluteDemand, int resourceServiceID, Procedure onServedCallback)
Simulates a resource demand by the specified request.void
finalise()
org.palladiosimulator.pcm.resourcetype.ResourceType
findResourceType(org.palladiosimulator.pcm.resourcetype.ResourceInterface resourceInterface)
Finds and returns the resource type providing the specified resource interface.void
init()
-
-
-
Constructor Detail
-
EventSimActiveResourceModel
@Inject public EventSimActiveResourceModel(ISimulationMiddleware middleware)
-
-
Method Detail
-
init
public void init()
-
consume
public void consume(IRequest request, org.palladiosimulator.pcm.resourceenvironment.ResourceContainer resourceContainer, org.palladiosimulator.pcm.resourcetype.ResourceType resourceType, double absoluteDemand, int resourceServiceID, Procedure onServedCallback)
Description copied from interface:IActiveResource
Simulates a resource demand by the specified request.- Specified by:
consume
in interfaceIActiveResource
- Parameters:
request
- the demanding requestresourceContainer
- the resource container of the requested resourceresourceType
- the type of the requested resourceabsoluteDemand
- the resource demandonServedCallback
- the callback to be invoked once the requested demand has been served
-
finalise
public void finalise()
-
findResourceType
public org.palladiosimulator.pcm.resourcetype.ResourceType findResourceType(org.palladiosimulator.pcm.resourcetype.ResourceInterface resourceInterface)
Description copied from interface:IActiveResource
Finds and returns the resource type providing the specified resource interface. If multiple resource types provide the specified interface, the result of this method is unspecified, so far.- Specified by:
findResourceType
in interfaceIActiveResource
- Parameters:
resourceInterface
- the resource interface- Returns:
- the resource type that provides the specified resource interface;
null
, if no such resource type could be found
-
-