brooklyn.event.basic.Sensors Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of brooklyn-core Show documentation
Show all versions of brooklyn-core Show documentation
Entity implementation classes, events, and other core elements
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