|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcat.hist.HistoryManager
This class is the Manager of the History of sensor data. All sensor is stored by this manager into ClientApplication. All sensor data can also be queried through the ClientApplication by this manager. Currently ClientApplication uses a local database for storing data, however, this can easy be modified to a remote db, or other storage mechanisms if necessary.
Field Summary | |
private ClientApplication |
ca
This is the object used to store retrieve sensor data. |
private java.util.Vector |
eventsQueue
Holds all sensor data events to be processed. |
Constructor Summary | |
HistoryManager()
This constructor starts the manager to get ready to process sensor data events. |
Method Summary | |
java.util.Vector[] |
query(java.lang.String id,
int type)
Use this method to retrieve the sensor data for the given sensor for all times. |
java.lang.Object |
query(java.lang.String id,
int type,
java.util.Calendar endtime)
Use this method to retrieve the sensor data for the given sensor that is closest to the given time. |
void |
run()
This method is for processing any and all sensor data that occurs in CAT. |
void |
update(java.lang.Object event)
Being an Observer, we must implement this method to get sensor events from those that we observe. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private java.util.Vector eventsQueue
private ClientApplication ca
Constructor Detail |
public HistoryManager()
Method Detail |
public java.lang.Object query(java.lang.String id, int type, java.util.Calendar endtime)
id
- The sensor id of the desired data.type
- The type of the sensor data.endtime
- The nearest time of the data.
public java.util.Vector[] query(java.lang.String id, int type)
id
- The sensor id of the desired data.type
- The type of the sensor data.
public void run()
run
in interface java.lang.Runnable
public void update(java.lang.Object event)
update
in interface SensorListener
event
- The incoming sensor event.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |