Class SimulatedProcess

    • Field Detail

      • LOGGER

        public static final org.apache.log4j.Logger LOGGER
      • myProcessState

        public ProcessState myProcessState
        Current state of this process
      • listeners

        protected final List<ISimProcessListener> listeners
        A list of process listeners getting notifications on resume and suspend
      • processStrategy

        public final ISimProcessStrategy processStrategy
        Strategy used to suspend threads if requested
    • Constructor Detail

      • SimulatedProcess

        public SimulatedProcess​(ISimProcessStrategy processStrategy)
        Default constructor.
        Parameters:
        processStrategy -
    • Method Detail

      • actions

        public void actions()
      • isTerminated

        public boolean isTerminated()
        Description copied from interface: ISimProcess
        Returns whether this process has finished its execution.
        Specified by:
        isTerminated in interface ISimProcess
      • passivate

        public void passivate()
        Description copied from interface: ISimProcess
        Passivates this process. This will suspend the simulation of the process until it is resumed again using the scheduleAt method.
        Specified by:
        passivate in interface ISimProcess
      • suspend

        public void suspend()
      • resume

        protected void resume()
      • notifyListeners

        protected void notifyListeners​(ISimProcess process,
                                       ProcessState oldState,
                                       ProcessState newState)
        Notifies registered listeners that the given process is about to be suspended or resumed again.
        Parameters:
        process - the process which is being resumed or suspended
        isSuspending - true, if the process is about to be suspended; false, if the process is about to be resumed