Class 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 a User.
    See Also:
    EventSimEntity
    • 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 model
        call - the system call
        user - the User that has issued the Request
    • Method Detail

      • getUser

        public IUser getUser()
        Returns the user that has issued this Request.
        Specified by:
        getUser in interface IRequest
        Returns:
        the user
      • 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 the namePrefix passed to the constructor concatenated with the entity's ID.
        Overrides:
        getName in class EventSimEntity
        Returns:
        a string representation of this entity
      • getRequestState

        public EntityState<org.palladiosimulator.pcm.seff.AbstractAction> getRequestState()
      • setRequestState

        public void setRequestState​(EntityState<org.palladiosimulator.pcm.seff.AbstractAction> state)
      • getId

        public long getId()
        Specified by:
        getId in interface IRequest
        Returns:
        the unique identifier of this user
      • getCurrentPosition

        public org.palladiosimulator.pcm.seff.AbstractAction getCurrentPosition()
        Specified by:
        getCurrentPosition in interface IRequest
      • 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 given behaviour by simulating the nested chain of actions. If these actions contain further ScenarioBehaviours, 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 simulated
        onCompletionCallback - 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 the EventSimModel that the entity is about to enter the system.
        Overrides:
        notifyEnteredSystem in class EventSimEntity
      • notifyLeftSystem

        public void notifyLeftSystem()
        Description copied from class: EventSimEntity
        Notifies all registered listeners as well as the EventSimModel that the entity has left the system.
        Overrides:
        notifyLeftSystem in class EventSimEntity