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

brooklyn.event.basic.Sensors Maven / Gradle / Ivy

There is a newer version: 0.7.0-M1
Show newest version
package brooklyn.event.basic;

import brooklyn.event.AttributeSensor;

import com.google.common.reflect.TypeToken;

public class Sensors {

    public static  AttributeSensor newSensor(Class type, String name) {
        return new BasicAttributeSensor(type, name);
    }

    public static  AttributeSensor newSensor(Class type, String name, String description) {
        return new BasicAttributeSensor(type, name, description);
    }

    public static  AttributeSensor newSensor(TypeToken type, String name, String description) {
        return new BasicAttributeSensor(type, name, description);
    }

    public static AttributeSensor newStringSensor(String name) {
        return newSensor(String.class, name);
    }

    public static AttributeSensor newStringSensor(String name, String description) {
        return newSensor(String.class, name, description);
    }

    public static AttributeSensor newIntegerSensor(String name) {
        return newSensor(Integer.class, name);
    }

    public static AttributeSensor newIntegerSensor(String name, String description) {
        return newSensor(Integer.class, name, description);
    }

    public static AttributeSensor newLongSensor(String name) {
        return newSensor(Long.class, name);
    }

    public static AttributeSensor newLongSensor(String name, String description) {
        return newSensor(Long.class, name, description);
    }

    public static AttributeSensor newDoubleSensor(String name) {
        return newSensor(Double.class, name);
    }

    public static AttributeSensor newDoubleSensor(String name, String description) {
        return newSensor(Double.class, name, description);
    }

    public static AttributeSensor newBooleanSensor(String name) {
        return newSensor(Boolean.class, name);
    }

    public static AttributeSensor newBooleanSensor(String name, String description) {
        return newSensor(Boolean.class, name, description);
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy