com.brayan.SECS.BLL
Class SensorManager

java.lang.Object
  extended by com.brayan.SECS.BLL.SensorManager

public class SensorManager
extends java.lang.Object

The Sensor Manager starts and stops all available and employed Sensors. It's also an Observer for all subscribed Sensors. It sends a SensorEvent to the Context Manager. This class is also be the appropriate spot to create non-semantic but smart sensor data.

Author:
Brayan

Field Summary
private static SensorManager ref
          class variable
 
Constructor Summary
private SensorManager()
          constructor not allowed to be called externally
 
Method Summary
 java.lang.Object clone()
          this overrides the clone() method - because it's of no use to us
static SensorManager getSingletonObject()
           
 void receiveSensorEvent(SensorEvent senEvent)
          This method adds additional information to the event report using the SensorMessage data unit.
 void start()
          starts the Sensor Manger and all subscribed sensors
private  void startAllSensors()
          This method will start all sensors available to the system
 void stop()
          stops the Sensor Manager and all subsribed sensors
private  void stopAllSensors()
          This method will stop all sensors available to the system
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ref

private static SensorManager ref
class variable

Constructor Detail

SensorManager

private SensorManager()
constructor not allowed to be called externally

Method Detail

getSingletonObject

public static SensorManager getSingletonObject()

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
this overrides the clone() method - because it's of no use to us

Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

start

public void start()
starts the Sensor Manger and all subscribed sensors


stop

public void stop()
stops the Sensor Manager and all subsribed sensors


startAllSensors

private void startAllSensors()
This method will start all sensors available to the system


stopAllSensors

private void stopAllSensors()
This method will stop all sensors available to the system


receiveSensorEvent

public void receiveSensorEvent(SensorEvent senEvent)
                        throws java.io.FileNotFoundException
This method adds additional information to the event report using the SensorMessage data unit.

Parameters:
senEvent - is a SensorEvent object that hold raw data information about the Sensor
Throws:
java.io.FileNotFoundException