All Downloads are FREE. Search and download functionalities are using the official Maven repository.

brooklyn.event.Sensor Maven / Gradle / Ivy

package brooklyn.event;

import java.io.Serializable;
import java.util.List;

import brooklyn.entity.Entity;

/**
 * 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 SensorEvent
 */
public interface Sensor extends Serializable {
    /**
     * Returns the Java {@link Class} for the sensor data.
     */
    Class getType();
 
    /**
     * Returns the type of the sensor data, as a {@link String} representation of the class name.
     */
    String getTypeName();
 
    /**
     * Returns the name of the sensor, in a dot-separated namespace.
     */
    String getName();
 
    /**
     * Returns the constitient parts of the sensor name as a {@link List}.
     */
    List getNameParts();
 
    /**
     * Returns the description of the sensor, for display.
     */
    String getDescription();
 
    /**
     * Create a new {@link SensorEvent} object for a specific {@link Entity} and data point.
     */
    SensorEvent newEvent(Entity entity, T value);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy