Class Request
- 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.system.entities.Request
-
- All Implemented Interfaces:
de.uka.ipd.sdq.simulation.abstractsimengine.IEntity,IRequest
- Direct Known Subclasses:
ForkedRequest
public class Request extends EventSimEntity implements IRequest
This entity represents the execution of a system call, which has been issued by aUser.- See Also:
EventSimEntity
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.kit.ipd.sdq.eventsim.entities.EventSimEntity
EventSimEntity.EntityLifecyclePhase
-
-
Field Summary
Fields Modifier and Type Field Description static StringCOMPONENT_PROPERTY
-
Constructor Summary
Constructors Constructor Description Request(de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationModel model, org.palladiosimulator.pcm.usagemodel.EntryLevelSystemCall call, IUser user)Constructs a new Request representing the execution of the specified system call, which has been issued by the given User.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddelay(double waitingTime, Procedure onResumeCallback)voidenterBehaviour(org.palladiosimulator.pcm.seff.ResourceDemandingBehaviour behaviour, Procedure onFinishCallback)ComponentInstancegetCurrentComponent()org.palladiosimulator.pcm.seff.AbstractActiongetCurrentPosition()longgetId()StringgetName()Returns the name of this entity.RequestgetParent()EntityState<org.palladiosimulator.pcm.seff.AbstractAction>getRequestState()org.palladiosimulator.pcm.usagemodel.EntryLevelSystemCallgetSystemCall()Returns the system call that is to be executed by this Request.IUsergetUser()Returns the user that has issued this Request.voidleaveBehaviour()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.voidsetRequestState(EntityState<org.palladiosimulator.pcm.seff.AbstractAction> state)voidsimulateAction(org.palladiosimulator.pcm.seff.AbstractAction action)voidsimulateBehaviour(org.palladiosimulator.pcm.seff.ResourceDemandingBehaviour behaviour, ComponentInstance component, Procedure onCompletionCallback)Simulates the givenbehaviourby simulating the nested chain of actions.StringtoString()-
Methods inherited from class edu.kit.ipd.sdq.eventsim.entities.EventSimEntity
addEntityListener, equals, getEntityId, getLifecyclePhase, hashCode, removeEntityListener, resetIdGenerator
-
-
-
-
Field Detail
-
COMPONENT_PROPERTY
public static final String COMPONENT_PROPERTY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Request
@Inject public Request(de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationModel model, org.palladiosimulator.pcm.usagemodel.EntryLevelSystemCall call, IUser user)Constructs a new Request representing the execution of the specified system call, which has been issued by the given User.- Parameters:
model- the simulation modelcall- the system calluser- the User that has issued the Request
-
-
Method Detail
-
getUser
public IUser getUser()
Returns the user that has issued this Request.
-
getSystemCall
public org.palladiosimulator.pcm.usagemodel.EntryLevelSystemCall getSystemCall()
Returns the system call that is to be executed by this Request.- Returns:
- the system call
-
getName
public String getName()
Returns the name of this entity. The name is thenamePrefixpassed to the constructor concatenated with the entity's ID.- Overrides:
getNamein classEventSimEntity- Returns:
- a string representation of this entity
-
toString
public String toString()
- Overrides:
toStringin classEventSimEntity
-
getRequestState
public EntityState<org.palladiosimulator.pcm.seff.AbstractAction> getRequestState()
-
setRequestState
public void setRequestState(EntityState<org.palladiosimulator.pcm.seff.AbstractAction> state)
-
getId
public long getId()
-
getCurrentPosition
public org.palladiosimulator.pcm.seff.AbstractAction getCurrentPosition()
- Specified by:
getCurrentPositionin interfaceIRequest
-
getCurrentComponent
public ComponentInstance getCurrentComponent()
-
enterBehaviour
public void enterBehaviour(org.palladiosimulator.pcm.seff.ResourceDemandingBehaviour behaviour, Procedure onFinishCallback)
-
leaveBehaviour
public void leaveBehaviour()
-
delay
public void delay(double waitingTime, Procedure onResumeCallback)
-
simulateBehaviour
public void simulateBehaviour(org.palladiosimulator.pcm.seff.ResourceDemandingBehaviour behaviour, ComponentInstance component, 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
-
simulateAction
public void simulateAction(org.palladiosimulator.pcm.seff.AbstractAction action)
-
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
-
-