brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [49/50] brooklyn-library git commit: AbstractController: use PORT_NUMBER_SENSOR config
Date Mon, 01 Feb 2016 17:47:07 GMT
AbstractController: use PORT_NUMBER_SENSOR config

- Previously, it hard-coded HTTP_PORT rather than using
  key specified in the configuration


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-library/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-library/commit/929ee88c
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-library/tree/929ee88c
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-library/diff/929ee88c

Branch: refs/heads/0.5.0
Commit: 929ee88c559c2696f48e681d75824c8f62be5640
Parents: 0d9ee80
Author: Aled Sage <aled.sage@gmail.com>
Authored: Wed Apr 17 14:41:12 2013 +0100
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Thu Apr 25 11:24:49 2013 +0100

----------------------------------------------------------------------
 .../main/java/brooklyn/entity/proxy/AbstractControllerImpl.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/929ee88c/software/webapp/src/main/java/brooklyn/entity/proxy/AbstractControllerImpl.java
----------------------------------------------------------------------
diff --git a/software/webapp/src/main/java/brooklyn/entity/proxy/AbstractControllerImpl.java
b/software/webapp/src/main/java/brooklyn/entity/proxy/AbstractControllerImpl.java
index 4585013..609cfed 100644
--- a/software/webapp/src/main/java/brooklyn/entity/proxy/AbstractControllerImpl.java
+++ b/software/webapp/src/main/java/brooklyn/entity/proxy/AbstractControllerImpl.java
@@ -150,7 +150,7 @@ public abstract class AbstractControllerImpl extends SoftwareProcessImpl
impleme
     }
 
     @Override
-    public AttributeSensor getPortNumberSensor() {
+    public AttributeSensor<Integer> getPortNumberSensor() {
         return getAttribute(PORT_NUMBER_SENSOR);
     }
 
@@ -336,7 +336,7 @@ public abstract class AbstractControllerImpl extends SoftwareProcessImpl
impleme
     
     protected String getAddressOfEntity(Entity member) {
         String ip = member.getAttribute(Attributes.HOSTNAME);
-        Integer port = member.getAttribute(Attributes.HTTP_PORT);
+        Integer port = member.getAttribute(getPortNumberSensor());
         if (ip!=null && port!=null) {
             return ip+":"+port;
         }


Mime
View raw message