public abstract class Process extends nl.tudelft.simulation.event.EventProducer implements ProcessInterface
Modifier and Type | Field and Description |
---|---|
protected Stack |
frameStack
the processStack of this process
|
protected short |
state
the state of the process
|
DEAD, EXECUTING, INITIAL, STATE_CHANGE_EVENT, SUSPENDED
Constructor and Description |
---|
Process()
constructs a new Process
|
Modifier and Type | Method and Description |
---|---|
short |
getState()
Returns the state of a process
|
abstract void |
process()
processes the process.
|
void |
resume()
resumes this process
|
protected void |
setState(short state)
sets the state of the process
|
void |
suspend()
suspends the process.
|
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getEventTypes, removeAllListeners, removeAllListeners, removeListener
protected short state
protected Stack frameStack
public Process()
simulator
- the simulator to schedule onpublic abstract void process()
process
in interface ProcessInterface
public void resume()
resume
in interface ProcessInterface
public final void suspend()
ProcessInterface
suspend
in interface ProcessInterface
protected final void setState(short state)
state
- the new statepublic short getState()
ProcessInterface
getState
in interface ProcessInterface
Copyright © 2002-2012 Delft University of Technology, the Netherlands. All Rights Reserved.