You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2006/02/26 23:10:29 UTC

svn commit: r381180 - /incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/runtime/RuntimeContextImpl.java

Author: jsdelfino
Date: Sun Feb 26 14:10:26 2006
New Revision: 381180

URL: http://svn.apache.org/viewcvs?rev=381180&view=rev
Log:
Added a method to return the current Aggregate

Modified:
    incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/runtime/RuntimeContextImpl.java

Modified: incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/runtime/RuntimeContextImpl.java
URL: http://svn.apache.org/viewcvs/incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/runtime/RuntimeContextImpl.java?rev=381180&r1=381179&r2=381180&view=diff
==============================================================================
--- incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/runtime/RuntimeContextImpl.java (original)
+++ incubator/tuscany/java/sca/core/src/main/java/org/apache/tuscany/core/runtime/RuntimeContextImpl.java Sun Feb 26 14:10:26 2006
@@ -42,6 +42,7 @@
 import org.apache.tuscany.core.invocation.spi.ProxyFactory;
 import org.apache.tuscany.core.system.context.SystemAggregateContextImpl;
 import org.apache.tuscany.core.system.context.SystemScopeStrategy;
+import org.apache.tuscany.model.assembly.Aggregate;
 import org.apache.tuscany.model.assembly.Extensible;
 import org.apache.tuscany.model.scdl.loader.SCDLModelLoader;
 
@@ -66,7 +67,7 @@
     private final SystemAggregateContext systemContext;
 
     private final MonitorFactory monitorFactory;
-
+    
     /**
      * Default constructor that creates a runtime with a NullMonitorFactory and no builders.
      */
@@ -90,10 +91,8 @@
         this.loaders = (loaders == null) ? new ArrayList(1) : loaders;
         this.wireBuilder = (wireBuilder == null) ? new DefaultWireBuilder() : wireBuilder;
 
-        rootContext = new AggregateContextImpl(ROOT, this, this, new RuntimeScopeStrategy(), new EventContextImpl(), this,
-                monitorFactory);
-        systemContext = new SystemAggregateContextImpl(SYSTEM, this, this, new SystemScopeStrategy(), new EventContextImpl(),
-                this, monitorFactory);
+        rootContext = new AggregateContextImpl(ROOT, this, this, new RuntimeScopeStrategy(), new EventContextImpl(), this, monitorFactory);
+        systemContext = new SystemAggregateContextImpl(SYSTEM, this, this, new SystemScopeStrategy(), new EventContextImpl(), this, monitorFactory);
     }
 
     /**
@@ -269,6 +268,10 @@
 
     public Object getImplementationInstance(boolean notify) throws TargetException {
         return this;
+    }
+    
+    public Aggregate getAggregate() {
+        return systemContext.getAggregate();
     }
 
     // ----------------------------------