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

svn commit: r450585 - in /incubator/tuscany/java/sca: kernel/host-api/src/main/java/org/apache/tuscany/host/ kernel/host-api/src/main/java/org/apache/tuscany/host/runtime/ runtime/webapp-host/src/main/java/org/apache/tuscany/runtime/webapp/

Author: jboynes
Date: Wed Sep 27 14:28:25 2006
New Revision: 450585

URL: http://svn.apache.org/viewvc?view=rev&rev=450585
Log:
make RuntimeInfo a property of TuscanyRuntime so a host can set it

Modified:
    incubator/tuscany/java/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/RuntimeInfo.java
    incubator/tuscany/java/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/runtime/TuscanyRuntime.java
    incubator/tuscany/java/sca/runtime/webapp-host/src/main/java/org/apache/tuscany/runtime/webapp/WebappRuntimeImpl.java

Modified: incubator/tuscany/java/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/RuntimeInfo.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/RuntimeInfo.java?view=diff&rev=450585&r1=450584&r2=450585
==============================================================================
--- incubator/tuscany/java/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/RuntimeInfo.java (original)
+++ incubator/tuscany/java/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/RuntimeInfo.java Wed Sep 27 14:28:25 2006
@@ -27,7 +27,11 @@
  * @version $Rev$ $Date$
  */
 public interface RuntimeInfo {
-    
+    /**
+     * The default name that the runtime should assign to the component providing this service.
+     */
+    static final String COMPONENT_NAME = "RuntimeInfo";
+
     /**
      * Return the directory where the running runtime was installed.
      *

Modified: incubator/tuscany/java/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/runtime/TuscanyRuntime.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/runtime/TuscanyRuntime.java?view=diff&rev=450585&r1=450584&r2=450585
==============================================================================
--- incubator/tuscany/java/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/runtime/TuscanyRuntime.java (original)
+++ incubator/tuscany/java/sca/kernel/host-api/src/main/java/org/apache/tuscany/host/runtime/TuscanyRuntime.java Wed Sep 27 14:28:25 2006
@@ -20,6 +20,8 @@
 
 import java.net.URL;
 
+import org.apache.tuscany.host.RuntimeInfo;
+
 /**
  * @version $Rev$ $Date$
  */
@@ -65,6 +67,22 @@
      * @param classLoader the host's ClassLoader
      */
     void setHostClassLoader(ClassLoader classLoader);
+
+    /**
+     * Returns the info this runtime will make available to service components.
+     *
+     * @return the info this runtime will make available to service components
+     */
+    RuntimeInfo getRuntimeInfo();
+
+    /**
+     * Sets the info this runtime should make available to service components.
+     * The instance supplied here should be registered in the system composite with the name
+     * {@link RuntimeInfo#COMPONENT_NAME "RuntimeInfo"}. 
+     *
+     * @param runtimeInfo the information this runtime should make available to service components
+     */
+    void setRuntimeInfo(RuntimeInfo runtimeInfo);
 
     /**
      * Initialize a runtime.

Modified: incubator/tuscany/java/sca/runtime/webapp-host/src/main/java/org/apache/tuscany/runtime/webapp/WebappRuntimeImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/runtime/webapp-host/src/main/java/org/apache/tuscany/runtime/webapp/WebappRuntimeImpl.java?view=diff&rev=450585&r1=450584&r2=450585
==============================================================================
--- incubator/tuscany/java/sca/runtime/webapp-host/src/main/java/org/apache/tuscany/runtime/webapp/WebappRuntimeImpl.java (original)
+++ incubator/tuscany/java/sca/runtime/webapp-host/src/main/java/org/apache/tuscany/runtime/webapp/WebappRuntimeImpl.java Wed Sep 27 14:28:25 2006
@@ -39,6 +39,7 @@
 import org.apache.tuscany.core.launcher.LauncherImpl;
 import org.apache.tuscany.core.monitor.MonitorFactoryUtil;
 import org.apache.tuscany.host.MonitorFactory;
+import org.apache.tuscany.host.RuntimeInfo;
 import org.apache.tuscany.host.servlet.ServletRequestInjector;
 import static org.apache.tuscany.runtime.webapp.Constants.CURRENT_COMPOSITE_PATH_PARAM;
 import static org.apache.tuscany.runtime.webapp.Constants.DEFAULT_EXTENSION_PATH_PARAM;
@@ -75,6 +76,7 @@
     private URL systemScdl;
     private URL applicationScdl;
     private ClassLoader webappClassLoader;
+    private RuntimeInfo runtimeInfo;
 
     private CompositeComponent component;
     private ServletLauncherMonitor monitor;
@@ -112,6 +114,14 @@
 
     public void setHostClassLoader(ClassLoader webappClassLoader) {
         this.webappClassLoader = webappClassLoader;
+    }
+
+    public RuntimeInfo getRuntimeInfo() {
+        return runtimeInfo;
+    }
+
+    public void setRuntimeInfo(RuntimeInfo runtimeInfo) {
+        this.runtimeInfo = runtimeInfo;
     }
 
     public void initialize() {



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