|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--cz.zcu.fav.kiv.jsimcasestudies.watersystem.application.StationMonitor
An encapsulation of the water station data and functionality. !!! This code should be changed in order to use the JiJ package - passive waiting in requestActivity().
Field Summary | |
int |
cntPumpsOn
Count of pumps currently switched on |
int |
cntPumpsReady
Count of pumps that are ready to work |
private CommonControlInterface |
controlInterface
A common interface between controlled object and the control program |
private int |
maxNumberOfPumpsOn
Maximum number of running pumps |
Constructor Summary | |
protected |
StationMonitor(CommonControlInterface controlInterface,
int maxNumberOfPumpsOn)
Constructor StationMonitor |
Method Summary | |
protected int |
getCntPumpsOn()
Synchronized method that return count of running pumps |
protected StationState |
getStationState()
Synchronized method that return consistent state of the station |
protected void |
releaseActivity()
Synchronized method - source reports, that its pump has been switchd off (water below low level) |
protected boolean |
requestActivity()
Synchronized method - source reports its ability to start the pump and requests the activity "permit" to be granted |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private CommonControlInterface controlInterface
private final int maxNumberOfPumpsOn
public int cntPumpsOn
public int cntPumpsReady
Constructor Detail |
protected StationMonitor(CommonControlInterface controlInterface, int maxNumberOfPumpsOn)
controlInterface
- maxNumberOfPumpsOn
- Method Detail |
protected boolean requestActivity()
protected void releaseActivity()
protected int getCntPumpsOn()
protected StationState getStationState()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |