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 String
COMPONENT_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 void
delay(double waitingTime, Procedure onResumeCallback)
void
enterBehaviour(org.palladiosimulator.pcm.seff.ResourceDemandingBehaviour behaviour, Procedure onFinishCallback)
ComponentInstance
getCurrentComponent()
org.palladiosimulator.pcm.seff.AbstractAction
getCurrentPosition()
long
getId()
String
getName()
Returns the name of this entity.Request
getParent()
EntityState<org.palladiosimulator.pcm.seff.AbstractAction>
getRequestState()
org.palladiosimulator.pcm.usagemodel.EntryLevelSystemCall
getSystemCall()
Returns the system call that is to be executed by this Request.IUser
getUser()
Returns the user that has issued this Request.void
leaveBehaviour()
void
notifyEnteredSystem()
Notifies all registered listeners as well as theEventSimModel
that the entity is about to enter the system.void
notifyLeftSystem()
Notifies all registered listeners as well as theEventSimModel
that the entity has left the system.void
setRequestState(EntityState<org.palladiosimulator.pcm.seff.AbstractAction> state)
void
simulateAction(org.palladiosimulator.pcm.seff.AbstractAction action)
void
simulateBehaviour(org.palladiosimulator.pcm.seff.ResourceDemandingBehaviour behaviour, ComponentInstance component, Procedure onCompletionCallback)
Simulates the givenbehaviour
by simulating the nested chain of actions.String
toString()
-
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 thenamePrefix
passed to the constructor concatenated with the entity's ID.- Overrides:
getName
in classEventSimEntity
- Returns:
- a string representation of this entity
-
toString
public String toString()
- Overrides:
toString
in 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:
getCurrentPosition
in 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 givenbehaviour
by simulating the nested chain of actions. If these actions contain furtherScenarioBehaviour
s, these are simulated as well (and so on, recursively).Once the entire behaviour has been simulated, the given
callback
will 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:EventSimEntity
Notifies all registered listeners as well as theEventSimModel
that the entity is about to enter the system.- Overrides:
notifyEnteredSystem
in classEventSimEntity
-
notifyLeftSystem
public void notifyLeftSystem()
Description copied from class:EventSimEntity
Notifies all registered listeners as well as theEventSimModel
that the entity has left the system.- Overrides:
notifyLeftSystem
in classEventSimEntity
-
-