Class SimulatedProcess

  • All Implemented Interfaces:
    de.uka.ipd.sdq.scheduler.ISchedulableProcess, de.uka.ipd.sdq.simulation.abstractsimengine.IEntity

    public class SimulatedProcess
    extends EventSimEntity
    implements de.uka.ipd.sdq.scheduler.ISchedulableProcess
    A simulated process is a process that can be scheduled on an active or passive resource. Whenever the scheduler activates or passivates the process, the IProcessListener, which has been passed to the constructor, gets notified.
    See Also:
    ISchedulableProcess
    • Constructor Detail

      • SimulatedProcess

        public SimulatedProcess​(de.uka.ipd.sdq.simulation.abstractsimengine.ISimulationModel model,
                                SimulatedProcess parent,
                                IRequest request)
    • Method Detail

      • setOnActivationCallback

        public void setOnActivationCallback​(Procedure callback)
      • activate

        public void activate()
        Specified by:
        activate in interface de.uka.ipd.sdq.scheduler.ISchedulableProcess
      • passivate

        public void passivate()
        Specified by:
        passivate in interface de.uka.ipd.sdq.scheduler.ISchedulableProcess
      • getId

        public String getId()
        Specified by:
        getId in interface de.uka.ipd.sdq.scheduler.ISchedulableProcess
      • getRootProcess

        public de.uka.ipd.sdq.scheduler.ISchedulableProcess getRootProcess()
        Specified by:
        getRootProcess in interface de.uka.ipd.sdq.scheduler.ISchedulableProcess
      • getRequest

        public IRequest getRequest()
        Returns the request that created this simulated process.
      • isFinished

        public boolean isFinished()
        Specified by:
        isFinished in interface de.uka.ipd.sdq.scheduler.ISchedulableProcess
      • terminate

        public void terminate()
        Terminates this simulated process. Notifies all observers that has been registered by the addTerminatedObserver method.

        If this simulated process terminated already, calling this method has no effect.

      • getPriority

        public int getPriority()
        Specified by:
        getPriority in interface de.uka.ipd.sdq.scheduler.ISchedulableProcess
      • setPriority

        public void setPriority​(int priority)
        Specified by:
        setPriority in interface de.uka.ipd.sdq.scheduler.ISchedulableProcess
      • addTerminatedObserver

        public void addTerminatedObserver​(de.uka.ipd.sdq.scheduler.IActiveResource o)
        Adds an observer which gets notifies when the process has ended its execution.
        Specified by:
        addTerminatedObserver in interface de.uka.ipd.sdq.scheduler.ISchedulableProcess
      • fireTerminated

        public void fireTerminated()
        Notifies the observers which have been registered via addTerminatedObserver(IActiveResource) that the process has ended it execution. This is automatically done, when terminate() method is being invoked.
        Specified by:
        fireTerminated in interface de.uka.ipd.sdq.scheduler.ISchedulableProcess
      • removeTerminatedObserver

        public void removeTerminatedObserver​(de.uka.ipd.sdq.scheduler.IActiveResource o)
        Removes the specified resource from the observer list.
        Specified by:
        removeTerminatedObserver in interface de.uka.ipd.sdq.scheduler.ISchedulableProcess
      • timeout

        public void timeout​(String timeoutFailureName)
        Specified by:
        timeout in interface de.uka.ipd.sdq.scheduler.ISchedulableProcess
      • getName

        public String getName()
        Description copied from class: EventSimEntity
        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
      • getCurrentPosition

        public org.palladiosimulator.pcm.seff.AbstractAction getCurrentPosition()