Class User
- java.lang.Object
-
- de.uka.ipd.sdq.simulation.abstractsimengine.SimulationElement
-
- de.uka.ipd.sdq.simulation.abstractsimengine.AbstractSimEntityDelegator
-
- edu.kit.ipd.sdq.eventsim.entities.EventSimEntity
-
- edu.kit.ipd.sdq.eventsim.workload.entities.User
-
- All Implemented Interfaces:
de.uka.ipd.sdq.simulation.abstractsimengine.IEntity,IUser
public class User extends EventSimEntity implements IUser
This entity represents a user of the system under simulation. Users issue system calls while traversing a usage scenario. They are spawned by aWorkloadGenerator.- See Also:
EventSimEntity
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.kit.ipd.sdq.eventsim.entities.EventSimEntity
EventSimEntity.EntityLifecyclePhase
-
-
Constructor Summary
Constructors Constructor Description User(de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationModel model, org.palladiosimulator.pcm.usagemodel.UsageScenario scenario)Constructs a new User that is supposed to traverse the specified usage scenario.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelay(double waitingTime, Procedure onResumeCallback)voidenterScenarioBehaviour(org.palladiosimulator.pcm.usagemodel.ScenarioBehaviour behaviour, Procedure onFinishCallback)StringgetId()de.uka.ipd.sdq.simucomframework.variables.StackContextgetStochasticExpressionContext()org.palladiosimulator.pcm.usagemodel.UsageScenariogetUsageScenario()Returns the usage scenario that is to be executed by this User.EntityState<org.palladiosimulator.pcm.usagemodel.AbstractUserAction>getUserState()voidleaveScenarioBehaviour()voidnotifyEnteredSystem()Notifies all registered listeners as well as theEventSimModelthat the entity is about to enter the system.voidnotifyLeftSystem()Notifies all registered listeners as well as theEventSimModelthat the entity has left the system.voidsimulateAction(org.palladiosimulator.pcm.usagemodel.AbstractUserAction action)voidsimulateBehaviour(org.palladiosimulator.pcm.usagemodel.ScenarioBehaviour behaviour, Procedure onCompletionCallback)Simulates the givenbehaviourby simulating the nested chain of actions.-
Methods inherited from class edu.kit.ipd.sdq.eventsim.entities.EventSimEntity
addEntityListener, equals, getEntityId, getLifecyclePhase, getName, hashCode, removeEntityListener, resetIdGenerator, toString
-
-
-
-
Constructor Detail
-
User
@Inject public User(de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationModel model, org.palladiosimulator.pcm.usagemodel.UsageScenario scenario)Constructs a new User that is supposed to traverse the specified usage scenario.- Parameters:
model- the simulation modelscenario- the usage scenario
-
-
Method Detail
-
getId
public String getId()
-
getUsageScenario
public org.palladiosimulator.pcm.usagemodel.UsageScenario getUsageScenario()
Returns the usage scenario that is to be executed by this User.- Specified by:
getUsageScenarioin interfaceIUser- Returns:
- the usage scenario
-
getUserState
public EntityState<org.palladiosimulator.pcm.usagemodel.AbstractUserAction> getUserState()
-
getStochasticExpressionContext
public de.uka.ipd.sdq.simucomframework.variables.StackContext getStochasticExpressionContext()
- Specified by:
getStochasticExpressionContextin interfaceIUser
-
enterScenarioBehaviour
public void enterScenarioBehaviour(org.palladiosimulator.pcm.usagemodel.ScenarioBehaviour behaviour, Procedure onFinishCallback)
-
leaveScenarioBehaviour
public void leaveScenarioBehaviour()
-
delay
public void delay(double waitingTime, Procedure onResumeCallback)
-
simulateAction
public void simulateAction(org.palladiosimulator.pcm.usagemodel.AbstractUserAction action)
-
simulateBehaviour
public void simulateBehaviour(org.palladiosimulator.pcm.usagemodel.ScenarioBehaviour behaviour, Procedure onCompletionCallback)Simulates the givenbehaviourby simulating the nested chain of actions. If these actions contain furtherScenarioBehaviours, these are simulated as well (and so on, recursively).Once the entire behaviour has been simulated, the given
callbackwill be invoked.When this method returns, there is no guarantee whether the behaviour has been simulated or not.
- Parameters:
behaviour- the behaviour to be simulatedonCompletionCallback- will be invoked once the behaviour has been simulated completely
-
notifyEnteredSystem
public void notifyEnteredSystem()
Description copied from class:EventSimEntityNotifies all registered listeners as well as theEventSimModelthat the entity is about to enter the system.- Overrides:
notifyEnteredSystemin classEventSimEntity
-
notifyLeftSystem
public void notifyLeftSystem()
Description copied from class:EventSimEntityNotifies all registered listeners as well as theEventSimModelthat the entity has left the system.- Overrides:
notifyLeftSystemin classEventSimEntity
-
-