tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rf...@apache.org
Subject svn commit: r530471 - in /incubator/tuscany/java/sca/modules: core-spi/src/main/java/org/apache/tuscany/spi/component/ core/src/main/java/org/apache/tuscany/core/component/ core/src/main/java/org/apache/tuscany/core/runtime/ core/src/test/java/org/apac...
Date Thu, 19 Apr 2007 16:15:59 GMT
Author: rfeng
Date: Thu Apr 19 09:15:48 2007
New Revision: 530471

URL: http://svn.apache.org/viewvc?view=rev&rev=530471
Log:
Remove ComponentManager.registerJavaObject()

Removed:
    incubator/tuscany/java/sca/modules/core/src/test/java/org/apache/tuscany/core/component/JavaObjectRegistrationTestCase.java
Modified:
    incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/ComponentManager.java
    incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/component/ComponentManagerImpl.java
    incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/AbstractRuntime.java

Modified: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/ComponentManager.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/ComponentManager.java?view=diff&rev=530471&r1=530470&r2=530471
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/ComponentManager.java
(original)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/ComponentManager.java
Thu Apr 19 09:15:48 2007
@@ -50,30 +50,6 @@
     void unregister(Component component) throws RegistrationException;
 
     /**
-     * Register a simple Java Object as a system component. This is primarily intended for
use by bootstrap code to
-     * create the initial configuration components.
-     *
-     * @param uri      the uri of the resulting component
-     * @param service  the service contract the component should expose
-     * @param instance the Object that will become the component's implementation
-     * @throws RegistrationException
-     */
-    <I> void registerJavaObject(URI uri, ComponentService service, I instance)
-        throws RegistrationException;
-
-    /**
-     * Register a simple Java Object as a system component. This is primarily intended for
use by bootstrap code to
-     * create the initial configuration components.
-     *
-     * @param uri      the name of the resulting component
-     * @param services the service contracts the component should expose
-     * @param instance the Object that will become the component's implementation
-     * @throws RegistrationException
-     */
-    <I> void registerJavaObject(URI uri, List<ComponentService> services, I instance)
-        throws RegistrationException;
-
-    /**
      * Returns the component with the given URI
      *
      * @param uri the component URI

Modified: incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/component/ComponentManagerImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/component/ComponentManagerImpl.java?view=diff&rev=530471&r1=530470&r2=530471
==============================================================================
--- incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/component/ComponentManagerImpl.java
(original)
+++ incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/component/ComponentManagerImpl.java
Thu Apr 19 09:15:48 2007
@@ -72,16 +72,6 @@
         }
     }
 
-    public <I> void registerJavaObject(URI uri, ComponentService service, I instance)
throws RegistrationException {
-        SingletonAtomicComponent<I> component = new SingletonAtomicComponent<I>(uri,
service, instance);
-        register(component);
-    }
-
-    public <I> void registerJavaObject(URI uri, List<ComponentService> services,
I instance) throws RegistrationException {
-        SingletonAtomicComponent<I> component = new SingletonAtomicComponent<I>(uri,
services, instance);
-        register(component);
-    }
-
     public synchronized void unregister(Component component) throws RegistrationException
{
         URI uri = component.getUri();
         components.remove(uri);

Modified: incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/AbstractRuntime.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/AbstractRuntime.java?view=diff&rev=530471&r1=530470&r2=530471
==============================================================================
--- incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/AbstractRuntime.java
(original)
+++ incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/runtime/AbstractRuntime.java
Thu Apr 19 09:15:48 2007
@@ -56,7 +56,6 @@
 import org.apache.tuscany.interfacedef.java.impl.DefaultJavaFactory;
 import org.apache.tuscany.spi.component.Component;
 import org.apache.tuscany.spi.component.ComponentManager;
-import org.apache.tuscany.spi.component.RegistrationException;
 import org.apache.tuscany.spi.component.ScopeRegistry;
 import org.apache.tuscany.spi.component.WorkContext;
 import org.apache.tuscany.spi.deployer.Deployer;
@@ -268,19 +267,6 @@
         contract.setInterfaceContract(javaInterfaceContract);
         javaInterfaceContract.setInterface(javaInterface);
         return contract;
-    }
-
-    protected <I> void registerSystemComponent(URI uri, List<Class<?>>
types, I component)
-        throws InitializationException {
-        try {
-            List<ComponentService> contracts = new ArrayList<ComponentService>();
-            for (Class<?> type : types) {
-                contracts.add(createContract(type));
-            }
-            componentManager.registerJavaObject(uri, contracts, component);
-        } catch (RegistrationException e) {
-            throw new InitializationException(e);
-        }
     }
 
     protected ComponentManager getComponentManager() {



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


Mime
View raw message