brooklyn.event
Interface Sensor<T>

All Superinterfaces:
Serializable
All Known Subinterfaces:
AttributeSensor<T>

public interface Sensor<T>
extends Serializable

The interface implemented by concrete sensors. A sensor is a container for a piece of data of a particular type, and exists in a hierarchical namespace. The name of the sensor is described as a set of tokens separated by dots.

See Also:
SensorEvent

Method Summary
 String getDescription()
          Returns the description of the sensor, for display.
 String getName()
          Returns the name of the sensor, in a dot-separated namespace.
 List<String> getNameParts()
          Returns the constitient parts of the sensor name as a List.
 Class<T> getType()
          Returns the Java Class for the sensor data.
 String getTypeName()
          Returns the type of the sensor data, as a String representation of the class name.
 SensorEvent<T> newEvent(Entity entity, T value)
          Create a new SensorEvent object for a specific Entity and data point.
 

Method Detail

getType

Class<T> getType()
Returns the Java Class for the sensor data.


getTypeName

String getTypeName()
Returns the type of the sensor data, as a String representation of the class name.


getName

String getName()
Returns the name of the sensor, in a dot-separated namespace.


getNameParts

List<String> getNameParts()
Returns the constitient parts of the sensor name as a List.


getDescription

String getDescription()
Returns the description of the sensor, for display.


newEvent

SensorEvent<T> newEvent(Entity entity,
                        T value)
Create a new SensorEvent object for a specific Entity and data point.



Copyright © 2013. All Rights Reserved.