brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [39/50] brooklyn-server git commit: geo-dns: update member list of entity.hostname changes
Date Mon, 01 Feb 2016 17:49:25 GMT
geo-dns: update member list of entity.hostname changes

- Useful for some private subnet examples, where the hostname/url
  gets transformed.
- Transforms tests from groovy to Java.


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

Branch: refs/heads/0.5.0
Commit: 187ffdbdd6b63aedf9a6887f795f048fc22bf046
Parents: 7358417
Author: Aled Sage <aled.sage@gmail.com>
Authored: Wed Apr 17 14:38:04 2013 +0100
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Thu Apr 25 11:18:21 2013 +0100

----------------------------------------------------------------------
 core/src/main/java/brooklyn/location/geo/HostGeoInfo.java | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/187ffdbd/core/src/main/java/brooklyn/location/geo/HostGeoInfo.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/location/geo/HostGeoInfo.java b/core/src/main/java/brooklyn/location/geo/HostGeoInfo.java
index 3c9c9a5..3903aad 100644
--- a/core/src/main/java/brooklyn/location/geo/HostGeoInfo.java
+++ b/core/src/main/java/brooklyn/location/geo/HostGeoInfo.java
@@ -1,5 +1,7 @@
 package brooklyn.location.geo;
 
+import static com.google.common.base.Preconditions.checkNotNull;
+
 import java.io.Serializable;
 import java.math.BigDecimal;
 import java.net.InetAddress;
@@ -99,12 +101,16 @@ public class HostGeoInfo implements Serializable {
     
     
     public HostGeoInfo(String address, String displayName, double latitude, double longitude)
{
-        this.address = address;
+        this.address = checkNotNull(address, "address");
         this.displayName = displayName==null ? "" : displayName;
         this.latitude = latitude;
         this.longitude = longitude;
     }
 
+    public String getAddress() {
+        return address;
+    }
+    
     @Override
     public String toString() {
         return "HostGeoInfo["+displayName+": "+address+" at ("+latitude+","+longitude+")]";


Mime
View raw message