elge.monitor
Class WorldRatioMonitor

java.lang.Object
  |
  +--elge.monitor.AbstractMonitor
        |
        +--elge.monitor.WorldMonitor
              |
              +--elge.monitor.WorldRatioMonitor
All Implemented Interfaces:
EventListener, Monitor, PropertyChangeListener

public class WorldRatioMonitor
extends WorldMonitor

THe world ratio properties is like WorldMonitor, but it monitors 2 properties and makes the ratio from them.

Author:
Pavol Žibrita

Field Summary
protected  PropertyDescriptor propR
          property descriptor
protected  String rp
          the second property
protected  int win
          The count the values should be increased
 
Fields inherited from class elge.monitor.WorldMonitor
propD
 
Fields inherited from class elge.monitor.AbstractMonitor
per, PROP_PROJECT, pt
 
Constructor Summary
WorldRatioMonitor()
          Creates a new instance of WorldRatioMonitor
 
Method Summary
 String getFullName()
          full name for this monitor
 String[] getIdentifiers()
          the identifiers
 String getMonitorName()
          monitor name
 String getRatioProperty()
          the second property
 Object[] getValues()
          the values
 int getWindow()
          gets the window
 boolean isAvailable()
          true if both properties are correct
 void setRatioProperty(String rp)
          sets the second property
 void setWindow(int win)
          sets th window
protected  void updateProperties()
          updates the descriptors
 
Methods inherited from class elge.monitor.WorldMonitor
getDescription, getMonitoredProperty, setMonitoredProperty, updateMonitor
 
Methods inherited from class elge.monitor.AbstractMonitor
addPropertyChangeListener, getPersistence, getProject, propertyChange, removePropertyChangeListener, restart, setPersistence, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rp

protected String rp
the second property


propR

protected PropertyDescriptor propR
property descriptor


win

protected int win
The count the values should be increased

Constructor Detail

WorldRatioMonitor

public WorldRatioMonitor()
Creates a new instance of WorldRatioMonitor

Method Detail

getWindow

public int getWindow()
gets the window

Returns:
window size

setWindow

public void setWindow(int win)
sets th window

Parameters:
win - the window size

getRatioProperty

public String getRatioProperty()
the second property

Returns:
the property name

setRatioProperty

public void setRatioProperty(String rp)
sets the second property

Parameters:
rp - the property name

updateProperties

protected void updateProperties()
updates the descriptors

Overrides:
updateProperties in class WorldMonitor

isAvailable

public boolean isAvailable()
true if both properties are correct

Overrides:
isAvailable in class WorldMonitor
Returns:
true if both properties are correct

getFullName

public String getFullName()
full name for this monitor

Specified by:
getFullName in interface Monitor
Overrides:
getFullName in class WorldMonitor
Returns:
full name

getIdentifiers

public String[] getIdentifiers()
the identifiers

Specified by:
getIdentifiers in interface Monitor
Overrides:
getIdentifiers in class WorldMonitor
Returns:
identifiers

getMonitorName

public String getMonitorName()
monitor name

Specified by:
getMonitorName in interface Monitor
Overrides:
getMonitorName in class WorldMonitor
Returns:
the name of the monitor

getValues

public Object[] getValues()
the values

Specified by:
getValues in interface Monitor
Overrides:
getValues in class WorldMonitor
Returns:
values