brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [07/50] [abbrv] brooklyn-server git commit: Add external-config-supplier registry to management context.
Date Mon, 01 Feb 2016 17:50:23 GMT
Add external-config-supplier registry to management context.


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

Branch: refs/heads/0.8.0-incubating
Commit: 8990f61c4d6c8dca402ee2811bb3cc2113b37c8f
Parents: 8343878
Author: Alasdair Hodge <github@alasdairhodge.co.uk>
Authored: Mon Jun 22 16:52:28 2015 +0100
Committer: Alasdair Hodge <github@alasdairhodge.co.uk>
Committed: Tue Aug 25 11:49:23 2015 +0100

----------------------------------------------------------------------
 .../core/mgmt/internal/AbstractManagementContext.java  | 13 +++++++++++--
 .../core/mgmt/internal/ManagementContextInternal.java  |  3 +++
 .../mgmt/internal/NonDeploymentManagementContext.java  |  6 ++++++
 3 files changed, 20 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/8990f61c/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/AbstractManagementContext.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/AbstractManagementContext.java
b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/AbstractManagementContext.java
index cdd7219..76871cd 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/AbstractManagementContext.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/AbstractManagementContext.java
@@ -164,9 +164,11 @@ public abstract class AbstractManagementContext implements ManagementContextInte
 
     private final BrooklynStorage storage;
 
+    protected final ExternalConfigSupplierRegistry configSupplierRegistry;
+
     private volatile boolean running = true;
     protected boolean startupComplete = false;
-    protected final List<Throwable> errors = Collections.synchronizedList(MutableList.<Throwable>of());

+    protected final List<Throwable> errors = Collections.synchronizedList(MutableList.<Throwable>of());
 
     protected Maybe<URI> uri = Maybe.absent();
     protected CatalogInitialization catalogInitialization;
@@ -191,6 +193,7 @@ public abstract class AbstractManagementContext implements ManagementContextInte
         this.highAvailabilityManager = new HighAvailabilityManagerImpl(this); // TODO leaking
"this" reference; yuck
         
         this.entitlementManager = Entitlements.newManager(this, brooklynProperties);
+        this.configSupplierRegistry = new BasicExternalConfigSupplierRegistry(this); // TODO
leaking "this" reference; yuck
     }
 
     @Override
@@ -478,5 +481,11 @@ public abstract class AbstractManagementContext implements ManagementContextInte
     public List<Throwable> errors() {
         return errors;
     }
-    
+
+    /** @since 0.8.0 */
+    @Override
+    public ExternalConfigSupplierRegistry getExternalConfigProviderRegistry() {
+        return configSupplierRegistry;
+    }
+
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/8990f61c/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/ManagementContextInternal.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/ManagementContextInternal.java
b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/ManagementContextInternal.java
index 933f0ac..e76f2fb 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/ManagementContextInternal.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/ManagementContextInternal.java
@@ -119,4 +119,7 @@ public interface ManagementContextInternal extends ManagementContext {
     @Beta
     void setCatalogInitialization(CatalogInitialization catalogInitialization);
 
+    @Beta
+    ExternalConfigSupplierRegistry getExternalConfigProviderRegistry();
+
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/8990f61c/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/NonDeploymentManagementContext.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/NonDeploymentManagementContext.java
b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/NonDeploymentManagementContext.java
index 7e1c324..87e8f84 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/NonDeploymentManagementContext.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/NonDeploymentManagementContext.java
@@ -465,6 +465,12 @@ public class NonDeploymentManagementContext implements ManagementContextInternal
         initialManagementContext.setCatalogInitialization(catalogInitialization);
     }
 
+    @Override
+    public ExternalConfigSupplierRegistry getExternalConfigProviderRegistry() {
+        checkInitialManagementContextReal();
+        return initialManagementContext.getExternalConfigProviderRegistry();
+    }
+
     /**
      * For when the initial management context is not "real"; the changeListener is a no-op,
but everything else forbidden.
      * 


Mime
View raw message