brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [3/4] incubator-brooklyn git commit: minor cr changes
Date Wed, 08 Apr 2015 09:26:28 GMT
minor cr changes


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/9538e7eb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/9538e7eb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/9538e7eb

Branch: refs/heads/master
Commit: 9538e7eb3f7dcb852cfbc00428519f38159c7a3b
Parents: 58b3704
Author: Duncan Grant <duncan.grant@cloudsoftcorp.com>
Authored: Tue Apr 7 16:54:36 2015 +0100
Committer: Duncan Grant <duncan.grant@cloudsoftcorp.com>
Committed: Tue Apr 7 16:54:36 2015 +0100

----------------------------------------------------------------------
 .../entity/messaging/rabbit/RabbitBroker.java     | 14 +++++++++-----
 .../entity/messaging/rabbit/RabbitBrokerImpl.java | 18 +++++++++++-------
 2 files changed, 20 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/9538e7eb/software/messaging/src/main/java/brooklyn/entity/messaging/rabbit/RabbitBroker.java
----------------------------------------------------------------------
diff --git a/software/messaging/src/main/java/brooklyn/entity/messaging/rabbit/RabbitBroker.java
b/software/messaging/src/main/java/brooklyn/entity/messaging/rabbit/RabbitBroker.java
index f883aec..be21c5e 100644
--- a/software/messaging/src/main/java/brooklyn/entity/messaging/rabbit/RabbitBroker.java
+++ b/software/messaging/src/main/java/brooklyn/entity/messaging/rabbit/RabbitBroker.java
@@ -18,6 +18,10 @@
  */
 package brooklyn.entity.messaging.rabbit;
 
+import java.util.Map;
+
+import com.google.common.annotations.Beta;
+
 import brooklyn.catalog.Catalog;
 import brooklyn.config.ConfigKey;
 import brooklyn.entity.basic.ConfigKeys;
@@ -26,11 +30,11 @@ import brooklyn.entity.messaging.MessageBroker;
 import brooklyn.entity.messaging.amqp.AmqpServer;
 import brooklyn.entity.proxying.ImplementedBy;
 import brooklyn.event.AttributeSensor;
-import brooklyn.event.basic.*;
+import brooklyn.event.basic.BasicAttributeSensorAndConfigKey;
+import brooklyn.event.basic.BasicConfigKey;
+import brooklyn.event.basic.PortAttributeSensorAndConfigKey;
+import brooklyn.event.basic.Sensors;
 import brooklyn.util.flags.SetFromFlag;
-import com.google.common.annotations.Beta;
-
-import java.util.Map;
 
 /**
  * An {@link brooklyn.entity.Entity} that represents a single Rabbit MQ broker instance,
using AMQP 0-9-1.
@@ -66,7 +70,7 @@ public interface RabbitBroker extends SoftwareProcess, MessageBroker, AmqpServer
 
     @SetFromFlag("managmentPort")
     public static final PortAttributeSensorAndConfigKey MANAGEMENT_PORT = new PortAttributeSensorAndConfigKey(
-                    "rabbitmq.management.port", "Port on which management interface will
be available", "15672+");
+            "rabbitmq.management.port", "Port on which management interface will be available",
"15672+");
 
     public static AttributeSensor<String> MANAGEMENT_URL = Sensors.newStringSensor(
             "rabbitmq.management.url", "Management URL is only available if management plugin
flag is true");

http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/9538e7eb/software/messaging/src/main/java/brooklyn/entity/messaging/rabbit/RabbitBrokerImpl.java
----------------------------------------------------------------------
diff --git a/software/messaging/src/main/java/brooklyn/entity/messaging/rabbit/RabbitBrokerImpl.java
b/software/messaging/src/main/java/brooklyn/entity/messaging/rabbit/RabbitBrokerImpl.java
index fbbe384..b317bf8 100644
--- a/software/messaging/src/main/java/brooklyn/entity/messaging/rabbit/RabbitBrokerImpl.java
+++ b/software/messaging/src/main/java/brooklyn/entity/messaging/rabbit/RabbitBrokerImpl.java
@@ -18,16 +18,18 @@
  */
 package brooklyn.entity.messaging.rabbit;
 
-import brooklyn.entity.basic.Entities;
-import brooklyn.entity.basic.SoftwareProcessImpl;
-import brooklyn.entity.proxying.EntitySpec;
-import com.google.common.base.Objects.ToStringHelper;
+import static java.lang.String.format;
+
+import java.util.Map;
+
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import java.util.Map;
+import com.google.common.base.Objects.ToStringHelper;
 
-import static java.lang.String.format;
+import brooklyn.entity.basic.Entities;
+import brooklyn.entity.basic.SoftwareProcessImpl;
+import brooklyn.entity.proxying.EntitySpec;
 
 /**
  * An {@link brooklyn.entity.Entity} that represents a single Rabbit MQ broker instance,
using AMQP 0-9-1.
@@ -93,7 +95,9 @@ public class RabbitBrokerImpl extends SoftwareProcessImpl implements RabbitBroke
 
         setBrokerUrl();
 
-        setAttribute(MANAGEMENT_URL, format("http://%s:%s/", getAttribute(HOSTNAME), getAttribute(MANAGEMENT_PORT)));
+        if (getEnableManagementPlugin()) {
+            setAttribute(MANAGEMENT_URL, format("http://%s:%s/", getAttribute(HOSTNAME),
getAttribute(MANAGEMENT_PORT)));
+        }
     }
 
     @Override


Mime
View raw message