stella.nut
Class UpsDriver.UpsRefresh
java.lang.Object
java.util.TimerTask
stella.nut.UpsDriver.UpsRefresh
- All Implemented Interfaces:
- Runnable
- Enclosing class:
- UpsDriver
private class UpsDriver.UpsRefresh
- extends TimerTask
The task that queries the UPS demon for all served variables at
certain time intervalls. The server, too, uses caching, which implies
that the values are never totally up-to-date, but on the other hand
reading is quick.
|
Method Summary |
void |
run()
Run the refresh task. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
cache
private Map<String,String> cache
- The cache I serve.
UpsDriver.UpsRefresh
private UpsDriver.UpsRefresh(Map<String,String> variables)
- Constructs a new refresh task where the cache to write the
values to is specified. Variable names are the keys in the
map.
run
public void run()
- Run the refresh task. For each key found in the cache we issue
a GET VAR and parse the response
according to VAR "".
- Specified by:
run in interface Runnable- Specified by:
run in class TimerTask