cat.sensor.event
Class SensorStatusEvent

java.lang.Object
  extended byjava.util.EventObject
      extended bycat.sensor.event.SensorEvent
          extended bycat.sensor.event.SensorStatusEvent
All Implemented Interfaces:
java.io.Serializable

public class SensorStatusEvent
extends SensorEvent

This status event carries specific information about a sensor. It might be used to signal that a sensor is broken or failing.

See Also:
Serialized Form

Field Summary
private  int status
          The status of the sensor sending this event.
static int STATUS_DOWN
          status variable.
static int STATUS_ERROR
          status variable.
static int STATUS_RUNNING
          status variable.
 
Fields inherited from class java.util.EventObject
source
 
Constructor Summary
SensorStatusEvent(java.lang.String id, int s)
          This constructor sets the id of the sensor sending the status event.
 
Method Summary
 int getStatus()
          This returns the status of the sensor that published this event.
 
Methods inherited from class java.util.EventObject
getSource, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

STATUS_RUNNING

public static int STATUS_RUNNING
status variable.


STATUS_DOWN

public static int STATUS_DOWN
status variable.


STATUS_ERROR

public static int STATUS_ERROR
status variable.


status

private int status
The status of the sensor sending this event.

Constructor Detail

SensorStatusEvent

public SensorStatusEvent(java.lang.String id,
                         int s)
This constructor sets the id of the sensor sending the status event.

Parameters:
id - The unique id of the sensor sending the status event.
s - The status of the sensor.
Method Detail

getStatus

public int getStatus()
This returns the status of the sensor that published this event.

Returns:
int The status of the sensor.