Monitor.Omr
Class CurrentRange
java.lang.Object
|
+--Monitor.Omr.CurrentRange
- public class CurrentRange
- extends java.lang.Object
Hold the range in which the parameter being monitored is operating.
This class holds the current percentage of processor usage calculated by the
CpuMonitor
object. It also determines the range this percentage
corresponds to. Finally, it calls a notifier object when there is a change in
the operation range for the parameter being monitored.
Constructor Summary |
CurrentRange(MonitoredEntities.Parameter par,
Notifier notifierThread)
Obtains reference to the parameter being monitored and the notifier object.
|
Method Summary |
int |
get()
Returns the current range in which the parameter being monitored is operating. |
void |
update(double new_current_value)
Receives the current percentage of processor use and determines the
corresponded range.
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CurrentRange
public CurrentRange(MonitoredEntities.Parameter par,
Notifier notifierThread)
- Obtains reference to the parameter being monitored and the notifier object.
This constructor receives the references for the parameter being monitored
and for the notifier object that will be called whenever the operation range
changes. It also display on screen all possible ranges of this parameter.
- Parameters:
par
- reference for the parameter being monitorednotifierThread
- reference for the notifierThread
update
public void update(double new_current_value)
- Receives the current percentage of processor use and determines the
corresponded range.
Receives the current percentage of processor use calculated by the
CpuMonitor
object and then determines the range this percentage corresponds to.
If the operation range has changed, it call the method notify
of the
notifierThread
which will notify this change to the Event Evaluator.
- Parameters:
new_current_value
- current value of processor use
get
public int get()
- Returns the current range in which the parameter being monitored is operating.
- Returns:
- current_range current range of the parameter being monitored