Class SimulatedProcess
java.lang.Object
de.uka.ipd.sdq.simulation.abstractsimengine.processes.SimulatedProcess
- All Implemented Interfaces:
IEntity
,ISimProcess
- Direct Known Subclasses:
DesmoJSimProcess
,SSJSimProcess
-
Field Summary
Modifier and TypeFieldDescriptionprotected final List<ISimProcessListener>
A list of process listeners getting notifications on resume and suspendstatic final org.apache.log4j.Logger
Current state of this processfinal ISimProcessStrategy
Strategy used to suspend threads if requested -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
actions()
void
protected abstract AbstractSimProcessDelegator
boolean
Returns whether this process has finished its execution.protected void
notifyListeners
(ISimProcess process, ProcessState oldState, ProcessState newState) Notifies registered listeners that the given process is about to be suspended or resumed again.void
Passivates this process.void
preempt()
void
protected void
resume()
void
startProcess
(ISimProcessStrategy processStrategy) void
suspend()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface de.uka.ipd.sdq.simulation.abstractsimengine.IEntity
isScheduled, reschedule
Methods inherited from interface de.uka.ipd.sdq.simulation.abstractsimengine.ISimProcess
passivate, scheduleAt
-
Field Details
-
LOGGER
public static final org.apache.log4j.Logger LOGGER -
myProcessState
Current state of this process -
listeners
A list of process listeners getting notifications on resume and suspend -
processStrategy
Strategy used to suspend threads if requested
-
-
Constructor Details
-
SimulatedProcess
Default constructor.- Parameters:
processStrategy
-
-
-
Method Details
-
startProcess
-
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 interfaceISimProcess
-
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 thescheduleAt
method.- Specified by:
passivate
in interfaceISimProcess
-
getAbstractProcess
-
suspend
public void suspend() -
resume
protected void resume() -
addProcessListener
- Specified by:
addProcessListener
in interfaceISimProcess
-
removeProcessListener
- Specified by:
removeProcessListener
in interfaceISimProcess
-
notifyListeners
Notifies registered listeners that the given process is about to be suspended or resumed again.- Parameters:
process
- the process which is being resumed or suspendedisSuspending
- true, if the process is about to be suspended; false, if the process is about to be resumed
-
preempt
public void preempt()- Specified by:
preempt
in interfaceISimProcess
-