cat.context
Class ContextManager

java.lang.Object
  extended bycat.context.ContextManager

public class ContextManager
extends java.lang.Object

This class is the Manager of all CAT components. It initializes and sets up the main CAT components such as Sensor, SIG, History.


Field Summary
private  HistoryManager historyManager
          This manages the access to the history of sensor data.
private  SensorManager sensorManager
          This manages all the CAT sensors.
private  SigManager sigManager
          This manages the sigs in CAT.
 
Constructor Summary
ContextManager()
          This constructor initializes create the tools/other managers in the constructor.
 
Method Summary
 void addSensor(Sensor s)
          This method is for adding a sensor to the CAT system.
 HistoryManager getHistoryManager()
          Returns the history manger for CAT apps to access.
 SensorManager getSensorManager()
          Returns the sensor manger for CAT apps to access.
 SigManager getSigManager()
          Returns the sig manger for CAT apps to access.
 void init()
          This method just links the other managers by having them listen to the sensors from the sensor manager.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sensorManager

private SensorManager sensorManager
This manages all the CAT sensors.


historyManager

private HistoryManager historyManager
This manages the access to the history of sensor data.


sigManager

private SigManager sigManager
This manages the sigs in CAT.

Constructor Detail

ContextManager

public ContextManager()
This constructor initializes create the tools/other managers in the constructor. Creates the other sub managers and then calls init.

Method Detail

init

public void init()
This method just links the other managers by having them listen to the sensors from the sensor manager.


addSensor

public void addSensor(Sensor s)
This method is for adding a sensor to the CAT system. It notifies the sensor manager and updates listeners of the other managers.

Parameters:
s - The sensor to add to CAT.

getSensorManager

public SensorManager getSensorManager()
Returns the sensor manger for CAT apps to access.

Returns:
SensorManager The SensorManager.

getHistoryManager

public HistoryManager getHistoryManager()
Returns the history manger for CAT apps to access.

Returns:
HistoryManager The HistoryManager.

getSigManager

public SigManager getSigManager()
Returns the sig manger for CAT apps to access.

Returns:
SigManager The SigManager.