cz.zcu.fav.kiv.jsimcasestudies.watersystem.application
Class InterruptEntry

java.lang.Object
  |
  +--cz.zcu.fav.kiv.jsimcasestudies.watersystem.application.InterruptEntry
All Implemented Interfaces:
InterruptEntryInterface

class InterruptEntry
extends java.lang.Object
implements InterruptEntryInterface

An implementation of interrupt entry object. The implementation assumes that more threads can wait for the same interrupt event. !!! This implementation uses JSim directly and it should be changed to use the JiJ package.

Version:
1.0 from 2004-04-30
Author:
St. RACEK

Field Summary
private  cz.zcu.fav.kiv.jsim.JSimSimulation simulation
           
private  cz.zcu.fav.kiv.jsim.JSimHead waitingRoom
           
 
Constructor Summary
protected InterruptEntry(cz.zcu.fav.kiv.jsim.JSimSimulation simulation)
          Contructor of the class InterruptEntry
 
Method Summary
 void interruptService()
          Interrupt service routine - it awakes all waiting processes and empties the waiting room.
 void waitInterrupt(cz.zcu.fav.kiv.jsim.JSimProcess process)
          Control processes calls the method when they wants to wait for the (one common) interrupt.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

waitingRoom

private cz.zcu.fav.kiv.jsim.JSimHead waitingRoom

simulation

private cz.zcu.fav.kiv.jsim.JSimSimulation simulation
Constructor Detail

InterruptEntry

protected InterruptEntry(cz.zcu.fav.kiv.jsim.JSimSimulation simulation)
                  throws cz.zcu.fav.kiv.jsim.JSimInvalidParametersException,
                         cz.zcu.fav.kiv.jsim.JSimTooManyHeadsException
Contructor of the class InterruptEntry

Method Detail

interruptService

public void interruptService()
Interrupt service routine - it awakes all waiting processes and empties the waiting room.

Specified by:
interruptService in interface InterruptEntryInterface

waitInterrupt

public void waitInterrupt(cz.zcu.fav.kiv.jsim.JSimProcess process)
                   throws cz.zcu.fav.kiv.jsim.JSimSecurityException
Control processes calls the method when they wants to wait for the (one common) interrupt. The calling process is put into the list. and it must be passivated after it!

Parameters:
process - Process that will to wait
cz.zcu.fav.kiv.jsim.JSimSecurityException


Copyright © 2000-2004 University of West Bohemia, FAV-KIV. All Rights Reserved. Build date 20040510