You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by me...@apache.org on 2007/02/16 08:42:40 UTC

svn commit: r508335 - /incubator/tuscany/java/sca/runtime/standalone/standalone-host/src/main/java/org/apache/tuscany/runtime/standalone/host/StandaloneRuntimeImpl.java

Author: meerajk
Date: Thu Feb 15 23:42:40 2007
New Revision: 508335

URL: http://svn.apache.org/viewvc?view=rev&rev=508335
Log:
nearly there for getting launcher working, now need to find the launched component and invoke the operation

Modified:
    incubator/tuscany/java/sca/runtime/standalone/standalone-host/src/main/java/org/apache/tuscany/runtime/standalone/host/StandaloneRuntimeImpl.java

Modified: incubator/tuscany/java/sca/runtime/standalone/standalone-host/src/main/java/org/apache/tuscany/runtime/standalone/host/StandaloneRuntimeImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/runtime/standalone/standalone-host/src/main/java/org/apache/tuscany/runtime/standalone/host/StandaloneRuntimeImpl.java?view=diff&rev=508335&r1=508334&r2=508335
==============================================================================
--- incubator/tuscany/java/sca/runtime/standalone/standalone-host/src/main/java/org/apache/tuscany/runtime/standalone/host/StandaloneRuntimeImpl.java (original)
+++ incubator/tuscany/java/sca/runtime/standalone/standalone-host/src/main/java/org/apache/tuscany/runtime/standalone/host/StandaloneRuntimeImpl.java Thu Feb 15 23:42:40 2007
@@ -27,15 +27,20 @@
 import org.apache.tuscany.spi.component.RegistrationException;
 import org.apache.tuscany.spi.component.TargetResolutionException;
 import org.apache.tuscany.spi.deployer.Deployer;
+import org.apache.tuscany.spi.implementation.java.JavaMappedService;
+import org.apache.tuscany.spi.implementation.java.PojoComponentType;
 import org.apache.tuscany.spi.model.ComponentDefinition;
 import org.apache.tuscany.spi.model.CompositeComponentType;
 import org.apache.tuscany.spi.model.CompositeImplementation;
 import org.apache.tuscany.spi.model.Implementation;
+import org.apache.tuscany.spi.model.Operation;
+import org.apache.tuscany.spi.wire.TargetInvoker;
 
 import org.apache.tuscany.core.runtime.AbstractRuntime;
 import org.apache.tuscany.host.runtime.InitializationException;
 import org.apache.tuscany.runtime.standalone.StandaloneRuntime;
 import org.apache.tuscany.runtime.standalone.StandaloneRuntimeInfo;
+import org.apache.tuscany.runtime.standalone.host.implementation.launched.Launched;
 import org.osoa.sca.ComponentContext;
 
 /**
@@ -85,7 +90,15 @@
             String name = entry.getKey();
             ComponentDefinition<? extends Implementation<?>> launchedDefinition = entry.getValue();
             Implementation<?> implementation = launchedDefinition.getImplementation();
-            System.err.println(implementation.getClass());
+            if(implementation.getClass().isAssignableFrom(Launched.class)) {
+                Launched launched = (Launched) implementation;
+                PojoComponentType launchedType = launched.getComponentType();
+                Map services = launchedType.getServices();
+                JavaMappedService testService = (JavaMappedService) services.get("main");
+                Operation<?> operation = testService.getServiceContract().getOperations().get("main");
+                // TODO Find the component and invoke main on the component
+                System.err.println("Got a lauched " + name);
+            }
         }
     }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org