nl.tudelft.simulation.dsol.interpreter.process
Class Process

java.lang.Object
  extended by nl.tudelft.simulation.event.EventProducer
      extended by nl.tudelft.simulation.dsol.interpreter.process.Process
All Implemented Interfaces:
Serializable, ProcessInterface, EventProducerInterface
Direct Known Subclasses:
NestedProcess

public abstract class Process
extends EventProducer
implements ProcessInterface

The Process class is an abstract Process which can be suspended and resumed.
(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser General Public License (LGPL) , no warranty.

Version:
$Revision: 1.1 $ $Date: 2007/01/06 13:25:13 $
Author:
Peter Jacobs
See Also:
Serialized Form

Field Summary
protected  Stack frameStack
          the processStack of this process
protected  short state
          the state of the process
 
Fields inherited from class nl.tudelft.simulation.event.EventProducer
listeners
 
Fields inherited from interface nl.tudelft.simulation.dsol.interpreter.process.ProcessInterface
DEAD, EXECUTING, INITIAL, STATE_CHANGE_EVENT, SUSPENDED
 
Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface
FIRST_POSITION, LAST_POSITION
 
Constructor Summary
Process()
          constructs a new Process
 
Method Summary
 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.
 
Methods inherited from class nl.tudelft.simulation.event.EventProducer
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getEventTypes, removeAllListeners, removeAllListeners, removeListener
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

state

protected short state
the state of the process


frameStack

protected Stack frameStack
the processStack of this process

Constructor Detail

Process

public Process()
constructs a new Process

Parameters:
simulator - the simulator to schedule on
Method Detail

process

public abstract void process()
processes the process.

Specified by:
process in interface ProcessInterface

resume

public void resume()
resumes this process

Specified by:
resume in interface ProcessInterface

suspend

public final void suspend()
Description copied from interface: ProcessInterface
suspends the process.

Specified by:
suspend in interface ProcessInterface

setState

protected final void setState(short state)
sets the state of the process

Parameters:
state - the new state

getState

public short getState()
Description copied from interface: ProcessInterface
Returns the state of a process

Specified by:
getState in interface ProcessInterface
Returns:
the state of a process


Copyright © 2002-2011 Delft University of Technology, the Netherlands. All Rights Reserved.