brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorb...@apache.org
Subject [3/8] brooklyn-server git commit: Add Sensors.newSensor(TypeToken, name)
Date Tue, 18 Oct 2016 12:43:29 GMT
Add Sensors.newSensor(TypeToken, name)


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/2797e0c2
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/2797e0c2
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/2797e0c2

Branch: refs/heads/master
Commit: 2797e0c23d53ae4e0e3900f8b92e117d1da92783
Parents: 8bbf68a
Author: Sam Corbett <sam.corbett@cloudsoftcorp.com>
Authored: Thu Oct 13 11:24:35 2016 +0100
Committer: Sam Corbett <sam.corbett@cloudsoftcorp.com>
Committed: Thu Oct 13 11:24:35 2016 +0100

----------------------------------------------------------------------
 core/src/main/java/org/apache/brooklyn/core/sensor/Sensors.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/2797e0c2/core/src/main/java/org/apache/brooklyn/core/sensor/Sensors.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/sensor/Sensors.java b/core/src/main/java/org/apache/brooklyn/core/sensor/Sensors.java
index 823689d..13bf6f2 100644
--- a/core/src/main/java/org/apache/brooklyn/core/sensor/Sensors.java
+++ b/core/src/main/java/org/apache/brooklyn/core/sensor/Sensors.java
@@ -84,6 +84,10 @@ public class Sensors {
         return new BasicAttributeSensor<T>(type, name);
     }
 
+    public static <T> AttributeSensor<T> newSensor(TypeToken<T> type, String
name) {
+        return new BasicAttributeSensor<T>(type, name);
+    }
+
     public static <T> AttributeSensor<T> newSensor(Class<T> type, String
name, String description) {
         return new BasicAttributeSensor<T>(type, name, description);
     }


Mime
View raw message