tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r547900 - in /incubator/tuscany/java/sca: modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/ modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/ modules/binding-jsonrpc/src/main/java/org/apache/tuscany...
Date Sat, 16 Jun 2007 10:29:08 GMT
Author: antelder
Date: Sat Jun 16 03:29:02 2007
New Revision: 547900

URL: http://svn.apache.org/viewvc?view=rev&rev=547900
Log:
extension helper interface/method name simplifications

Added:
    incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxService.java
      - copied, changed from r547893, incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxServiceListener.java
    incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCService.java
      - copied, changed from r547893, incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCServiceListener.java
    incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIReferenceInvoker.java
      - copied, changed from r547893, incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIBindingInvoker.java
    incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIService.java
      - copied, changed from r547893, incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIServiceListener.java
    incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/ComponentLifecycle.java
      - copied, changed from r547893, incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/ServiceListener.java
Removed:
    incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxServiceListener.java
    incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCServiceListener.java
    incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIBindingInvoker.java
    incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIServiceListener.java
    incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/ReferenceInvokerFactory.java
    incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/ServiceListener.java
Modified:
    incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxBindingActivator.java
    incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxInvokerFactory.java
    incubator/tuscany/java/sca/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/EJBBindingActivator.java
    incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBindingActivator.java
    incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/ScaDomainScriptServlet.java
    incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIBindingActivator.java
    incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIReferenceInvokerFactory.java
    incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/BindingActivator.java
    incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/impl/BindingsActivator.java
    incubator/tuscany/java/sca/samples/spi-implementation-pojo/src/main/java/sample/JavaImplementationActivator.java

Modified: incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxBindingActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxBindingActivator.java?view=diff&rev=547900&r1=547899&r2=547900
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxBindingActivator.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxBindingActivator.java
Sat Jun 16 03:29:02 2007
@@ -27,8 +27,8 @@
 import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
 import org.apache.tuscany.sca.runtime.RuntimeComponentService;
 import org.apache.tuscany.sca.spi.BindingActivator;
-import org.apache.tuscany.sca.spi.ReferenceInvokerFactory;
-import org.apache.tuscany.sca.spi.ServiceListener;
+import org.apache.tuscany.sca.spi.InvokerFactory;
+import org.apache.tuscany.sca.spi.ComponentLifecycle;
 
 public class AjaxBindingActivator implements BindingActivator<AjaxBinding>{
 
@@ -48,12 +48,12 @@
         return AJAX_BINDING_QNAME;
     }
 
-    public ReferenceInvokerFactory createInvokerFactory(RuntimeComponent rc, RuntimeComponentReference
rcr, AjaxBinding binding) {
+    public InvokerFactory createInvokerFactory(RuntimeComponent rc, RuntimeComponentReference
rcr, AjaxBinding binding) {
         return new AjaxInvokerFactory(rc, rcr, binding, servletHost);
     }
 
-    public ServiceListener createServiceListener(RuntimeComponent rc, RuntimeComponentService
rcs, AjaxBinding binding) {
-        return new AjaxServiceListener(rc, rcs, binding, servletHost);
+    public ComponentLifecycle createService(RuntimeComponent rc, RuntimeComponentService
rcs, AjaxBinding binding) {
+        return new AjaxService(rc, rcs, binding, servletHost);
     }
 
 }

Modified: incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxInvokerFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxInvokerFactory.java?view=diff&rev=547900&r1=547899&r2=547900
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxInvokerFactory.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxInvokerFactory.java
Sat Jun 16 03:29:02 2007
@@ -19,16 +19,17 @@
 
 package org.apache.tuscany.sca.binding.ajax;
 
-import static org.apache.tuscany.sca.binding.ajax.AjaxServiceListener.SERVLET_PATH;
+import static org.apache.tuscany.sca.binding.ajax.AjaxService.SERVLET_PATH;
 
 import org.apache.tuscany.sca.http.ServletHost;
 import org.apache.tuscany.sca.interfacedef.Operation;
 import org.apache.tuscany.sca.invocation.Invoker;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
 import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
-import org.apache.tuscany.sca.spi.ReferenceInvokerFactory;
+import org.apache.tuscany.sca.spi.InvokerFactory;
+import org.apache.tuscany.sca.spi.ComponentLifecycle;
 
-public class AjaxInvokerFactory implements ReferenceInvokerFactory {
+public class AjaxInvokerFactory implements InvokerFactory, ComponentLifecycle {
 
     protected RuntimeComponent runtimeComponent;
     protected RuntimeComponentReference runtimeComponentReference;

Copied: incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxService.java
(from r547893, incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxServiceListener.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxService.java?view=diff&rev=547900&p1=incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxServiceListener.java&r1=547893&p2=incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxService.java&r2=547900
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxServiceListener.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxService.java
Sat Jun 16 03:29:02 2007
@@ -24,9 +24,9 @@
 import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
 import org.apache.tuscany.sca.runtime.RuntimeComponentService;
-import org.apache.tuscany.sca.spi.ServiceListener;
+import org.apache.tuscany.sca.spi.ComponentLifecycle;
 
-public class AjaxServiceListener implements ServiceListener {
+public class AjaxService implements ComponentLifecycle {
 
     RuntimeComponent rc;
     RuntimeComponentService rcs;
@@ -35,7 +35,7 @@
     
     public static final String SERVLET_PATH = AjaxServlet.AJAX_SERVLET_PATH + "/*";
 
-    public AjaxServiceListener(RuntimeComponent rc, RuntimeComponentService rcs, Binding
binding, ServletHost servletHost) {
+    public AjaxService(RuntimeComponent rc, RuntimeComponentService rcs, Binding binding,
ServletHost servletHost) {
         this.rc = rc;
         this.rcs = rcs;
         this.binding = binding;

Modified: incubator/tuscany/java/sca/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/EJBBindingActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/EJBBindingActivator.java?view=diff&rev=547900&r1=547899&r2=547900
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/EJBBindingActivator.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/EJBBindingActivator.java
Sat Jun 16 03:29:02 2007
@@ -30,28 +30,25 @@
 import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
 import org.apache.tuscany.sca.runtime.RuntimeComponentService;
 import org.apache.tuscany.sca.spi.BindingActivator;
-import org.apache.tuscany.sca.spi.ReferenceInvokerFactory;
-import org.apache.tuscany.sca.spi.ServiceListener;
+import org.apache.tuscany.sca.spi.ComponentLifecycle;
+import org.apache.tuscany.sca.spi.InvokerFactory;
 import org.osoa.sca.ServiceRuntimeException;
 
 public class EJBBindingActivator implements BindingActivator {
 
     public static final QName BINDING_EJB = new QName(Constants.SCA10_NS, "binding.ejb");
     
-    public ReferenceInvokerFactory createInvokerFactory(RuntimeComponent rc, RuntimeComponentReference
rcr, final Binding binding) {
+    public InvokerFactory createInvokerFactory(RuntimeComponent rc, RuntimeComponentReference
rcr, final Binding binding) {
         // TODO: assumes a Java interface, need to support tuscany generic Interface
         final Class si = ((JavaInterface)rcr.getInterfaceContract().getInterface()).getJavaClass();
-        return new ReferenceInvokerFactory() {
+        return new InvokerFactory() {
             public Invoker createInvoker(Operation operation) {
                 return new EJBTargetInvoker((EJBBinding)binding, si, operation);
             }
-            public void start() {
-            }
-            public void stop() {
-            }};
+         };
     }
 
-    public ServiceListener createServiceListener(RuntimeComponent rc, RuntimeComponentService
rcs, Binding binding) {
+    public ComponentLifecycle createService(RuntimeComponent rc, RuntimeComponentService
rcs, Binding binding) {
         throw new ServiceRuntimeException("services not yet implemented for binidng.ejb");
     }
 

Modified: incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBindingActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBindingActivator.java?view=diff&rev=547900&r1=547899&r2=547900
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBindingActivator.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBindingActivator.java
Sat Jun 16 03:29:02 2007
@@ -28,8 +28,8 @@
 import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
 import org.apache.tuscany.sca.runtime.RuntimeComponentService;
 import org.apache.tuscany.sca.spi.BindingActivator;
-import org.apache.tuscany.sca.spi.ReferenceInvokerFactory;
-import org.apache.tuscany.sca.spi.ServiceListener;
+import org.apache.tuscany.sca.spi.InvokerFactory;
+import org.apache.tuscany.sca.spi.ComponentLifecycle;
 import org.osoa.sca.ServiceRuntimeException;
 
 public class JSONRPCBindingActivator implements BindingActivator<JSONRPCBinding> {
@@ -50,12 +50,12 @@
         return JSONRPCBinding.class;
     }
 
-    public ReferenceInvokerFactory createInvokerFactory(RuntimeComponent rc, RuntimeComponentReference
rcr, JSONRPCBinding binding) {
+    public InvokerFactory createInvokerFactory(RuntimeComponent rc, RuntimeComponentReference
rcr, JSONRPCBinding binding) {
         throw new ServiceRuntimeException("SCA reference support not yet implemented");
     }
 
-    public ServiceListener createServiceListener(RuntimeComponent rc, RuntimeComponentService
rcs, JSONRPCBinding binding) {
-        return new JSONRPCServiceListener(rc, rcs, binding, servletHost);
+    public ComponentLifecycle createService(RuntimeComponent rc, RuntimeComponentService
rcs, JSONRPCBinding binding) {
+        return new JSONRPCService(rc, rcs, binding, servletHost);
     }
 
 }

Copied: incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCService.java
(from r547893, incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCServiceListener.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCService.java?view=diff&rev=547900&p1=incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCServiceListener.java&r1=547893&p2=incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCService.java&r2=547900
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCServiceListener.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCService.java
Sat Jun 16 03:29:02 2007
@@ -24,7 +24,7 @@
 import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
 import org.apache.tuscany.sca.runtime.RuntimeComponentService;
-import org.apache.tuscany.sca.spi.ServiceListener;
+import org.apache.tuscany.sca.spi.ComponentLifecycle;
 
 /**
  * Implementation of the JSONRPC binding provider.
@@ -33,7 +33,7 @@
  * One servlet to handle requests for the scaDomain script and seperate
  * servlets for each SCA <service> which uses <binding.jsonrpc>. 
  */
-public class JSONRPCServiceListener implements ServiceListener {
+public class JSONRPCService implements ComponentLifecycle {
 
     private RuntimeComponent component;
     private RuntimeComponentService service;
@@ -48,7 +48,7 @@
     public static final String SCA_DOMAIN_SCRIPT = SERVICE_PREFIX + "scaDomain.js";
 
 
-    public JSONRPCServiceListener(RuntimeComponent component,
+    public JSONRPCService(RuntimeComponent component,
                                          RuntimeComponentService service,
                                          JSONRPCBinding binding,
                                          ServletHost servletHost) {

Modified: incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/ScaDomainScriptServlet.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/ScaDomainScriptServlet.java?view=diff&rev=547900&r1=547899&r2=547900
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/ScaDomainScriptServlet.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/ScaDomainScriptServlet.java
Sat Jun 16 03:29:02 2007
@@ -29,7 +29,7 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import static org.apache.tuscany.sca.binding.jsonrpc.JSONRPCServiceListener.SERVICE_PREFIX;
+import static org.apache.tuscany.sca.binding.jsonrpc.JSONRPCService.SERVICE_PREFIX;
 
 /**
  * Servlet to handle requests for the scaDomain.js script.

Modified: incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIBindingActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIBindingActivator.java?view=diff&rev=547900&r1=547899&r2=547900
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIBindingActivator.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIBindingActivator.java
Sat Jun 16 03:29:02 2007
@@ -27,8 +27,8 @@
 import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
 import org.apache.tuscany.sca.runtime.RuntimeComponentService;
 import org.apache.tuscany.sca.spi.BindingActivator;
-import org.apache.tuscany.sca.spi.ReferenceInvokerFactory;
-import org.apache.tuscany.sca.spi.ServiceListener;
+import org.apache.tuscany.sca.spi.InvokerFactory;
+import org.apache.tuscany.sca.spi.ComponentLifecycle;
 
 public class RMIBindingActivator implements BindingActivator<RMIBinding> {
 
@@ -48,12 +48,12 @@
         return RMIBinding.class;
     }
 
-    public ReferenceInvokerFactory createInvokerFactory(RuntimeComponent rc, RuntimeComponentReference
rcr, RMIBinding binding) {
+    public InvokerFactory createInvokerFactory(RuntimeComponent rc, RuntimeComponentReference
rcr, RMIBinding binding) {
         return new RMIReferenceInvokerFactory(rc, rcr, binding, rmiHost);
     }
 
-    public ServiceListener createServiceListener(RuntimeComponent rc, RuntimeComponentService
rcs, RMIBinding binding) {
-        return new RMIServiceListener(rc, rcs, binding, rmiHost);
+    public ComponentLifecycle createService(RuntimeComponent rc, RuntimeComponentService
rcs, RMIBinding binding) {
+        return new RMIService(rc, rcs, binding, rmiHost);
     }
 
 }

Copied: incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIReferenceInvoker.java
(from r547893, incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIBindingInvoker.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIReferenceInvoker.java?view=diff&rev=547900&p1=incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIBindingInvoker.java&r1=547893&p2=incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIReferenceInvoker.java&r2=547900
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIBindingInvoker.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIReferenceInvoker.java
Sat Jun 16 03:29:02 2007
@@ -23,7 +23,7 @@
 import org.apache.tuscany.sca.invocation.Message;
 import org.apache.tuscany.sca.rmi.RMIHost;
 
-public class RMIBindingInvoker implements Invoker {
+public class RMIReferenceInvoker implements Invoker {
 
     private RMIHost rmiHost;
     private String host;
@@ -32,7 +32,7 @@
     private Method remoteMethod;
     private Remote proxy;
 
-    public RMIBindingInvoker(RMIHost rmiHost, String host, String port, String svcName, Method
remoteMethod) {
+    public RMIReferenceInvoker(RMIHost rmiHost, String host, String port, String svcName,
Method remoteMethod) {
         this.rmiHost = rmiHost;
         this.remoteMethod = remoteMethod;
         this.host = host;

Modified: incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIReferenceInvokerFactory.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIReferenceInvokerFactory.java?view=diff&rev=547900&r1=547899&r2=547900
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIReferenceInvokerFactory.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIReferenceInvokerFactory.java
Sat Jun 16 03:29:02 2007
@@ -28,10 +28,10 @@
 import org.apache.tuscany.sca.rmi.RMIHost;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
 import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
-import org.apache.tuscany.sca.spi.ReferenceInvokerFactory;
+import org.apache.tuscany.sca.spi.InvokerFactory;
 import org.osoa.sca.ServiceRuntimeException;
 
-public class RMIReferenceInvokerFactory implements ReferenceInvokerFactory {
+public class RMIReferenceInvokerFactory implements InvokerFactory {
 
     RuntimeComponentReference reference;
     RMIHost rmiHost;
@@ -49,17 +49,11 @@
             Class<?> iface = ((JavaInterface)reference.getInterfaceContract().getInterface()).getJavaClass();
             Method remoteMethod = JavaInterfaceUtil.findMethod(iface, operation);
 
-            return new RMIBindingInvoker(rmiHost, binding.getHost(), binding.getPort(), binding.getServiceName(),
remoteMethod);
+            return new RMIReferenceInvoker(rmiHost, binding.getHost(), binding.getPort(),
binding.getServiceName(), remoteMethod);
 
         } catch (NoSuchMethodException e) {
             throw new ServiceRuntimeException(operation.toString(), e);
         }
-    }
-
-    public void start() {
-    }
-
-    public void stop() {
     }
 
 }

Copied: incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIService.java
(from r547893, incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIServiceListener.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIService.java?view=diff&rev=547900&p1=incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIServiceListener.java&r1=547893&p2=incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIService.java&r2=547900
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIServiceListener.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIService.java
Sat Jun 16 03:29:02 2007
@@ -42,17 +42,17 @@
 import org.apache.tuscany.sca.rmi.RMIHostException;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
 import org.apache.tuscany.sca.runtime.RuntimeComponentService;
-import org.apache.tuscany.sca.spi.ServiceListener;
+import org.apache.tuscany.sca.spi.ComponentLifecycle;
 import org.osoa.sca.ServiceRuntimeException;
 
-public class RMIServiceListener implements ServiceListener {
+public class RMIService implements ComponentLifecycle {
 
     RuntimeComponent component;
     RuntimeComponentService service;
     private RMIBinding binding;
     RMIHost rmiHost;
 
-    public RMIServiceListener(RuntimeComponent rc, RuntimeComponentService rcs, RMIBinding
binding, RMIHost rmiHost) {
+    public RMIService(RuntimeComponent rc, RuntimeComponentService rcs, RMIBinding binding,
RMIHost rmiHost) {
         this.component = rc;
         this.service = rcs;
         this.binding = binding;

Modified: incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/BindingActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/BindingActivator.java?view=diff&rev=547900&r1=547899&r2=547900
==============================================================================
--- incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/BindingActivator.java
(original)
+++ incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/BindingActivator.java
Sat Jun 16 03:29:02 2007
@@ -32,8 +32,8 @@
     
     Class<B> getBindingClass();
 
-    ReferenceInvokerFactory createInvokerFactory(RuntimeComponent rc, RuntimeComponentReference
rcr, B binding);
+    InvokerFactory createInvokerFactory(RuntimeComponent rc, RuntimeComponentReference rcr,
B binding);
     
-    ServiceListener createServiceListener(RuntimeComponent rc, RuntimeComponentService rcs,
B binding);
+    ComponentLifecycle createService(RuntimeComponent rc, RuntimeComponentService rcs, B
binding);
     
 }

Copied: incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/ComponentLifecycle.java
(from r547893, incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/ServiceListener.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/ComponentLifecycle.java?view=diff&rev=547900&p1=incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/ServiceListener.java&r1=547893&p2=incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/ComponentLifecycle.java&r2=547900
==============================================================================
--- incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/ServiceListener.java
(original)
+++ incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/ComponentLifecycle.java
Sat Jun 16 03:29:02 2007
@@ -20,7 +20,7 @@
 package org.apache.tuscany.sca.spi;
 
 
-public interface ServiceListener {
+public interface ComponentLifecycle {
     
     void start();
     void stop();

Modified: incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/impl/BindingsActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/impl/BindingsActivator.java?view=diff&rev=547900&r1=547899&r2=547900
==============================================================================
--- incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/impl/BindingsActivator.java
(original)
+++ incubator/tuscany/java/sca/modules/extension-helper/src/main/java/org/apache/tuscany/sca/spi/impl/BindingsActivator.java
Sat Jun 16 03:29:02 2007
@@ -42,8 +42,8 @@
 import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
 import org.apache.tuscany.sca.runtime.RuntimeComponentService;
 import org.apache.tuscany.sca.spi.BindingActivator;
-import org.apache.tuscany.sca.spi.ReferenceInvokerFactory;
-import org.apache.tuscany.sca.spi.ServiceListener;
+import org.apache.tuscany.sca.spi.InvokerFactory;
+import org.apache.tuscany.sca.spi.ComponentLifecycle;
 
 public class BindingsActivator implements ModuleActivator {
 
@@ -74,7 +74,7 @@
                                                                                    final
Binding b) {
                         return new ReferenceBindingProvider() {
                             List<InvokerProxy> invokers = new ArrayList<InvokerProxy>();
-                            private ReferenceInvokerFactory factory;
+                            private InvokerFactory factory;
                             public Invoker createInvoker(Operation operation, boolean isCallback)
{
                                 InvokerProxy invoker = new InvokerProxy(operation);
                                 invokers.add(invoker);    
@@ -85,14 +85,17 @@
                             }
                             public void start() {
                                 factory = bindingActivator.createInvokerFactory(rc, rcr,
b);
-                                factory.start();
-                                
+                                if (factory instanceof ComponentLifecycle) {
+                                    ((ComponentLifecycle)factory).start();
+                                }
                                 for (InvokerProxy invoker : invokers) {
                                     invoker.start(factory);
                                 }
                             }
                             public void stop() {
-                                factory.stop();
+                                if (factory instanceof ComponentLifecycle) {
+                                    ((ComponentLifecycle)factory).stop();
+                                }
                             }};
                     }
 
@@ -100,7 +103,7 @@
                                                                                final RuntimeComponentService
rcs,
                                                                                final Binding
b) {
                         return new ServiceBindingProvider(){
-                            ServiceListener listener = bindingActivator.createServiceListener(rc,
rcs, b);
+                            ComponentLifecycle listener = bindingActivator.createService(rc,
rcs, b);
                             public InterfaceContract getBindingInterfaceContract() {
                                 return null;
                             }
@@ -158,7 +161,7 @@
     public Message invoke(Message arg0) {
         return invoker.invoke(arg0);
     }
-    public void start(ReferenceInvokerFactory factory) {
+    public void start(InvokerFactory factory) {
         invoker = factory.createInvoker(op);
     }
  }

Modified: incubator/tuscany/java/sca/samples/spi-implementation-pojo/src/main/java/sample/JavaImplementationActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/spi-implementation-pojo/src/main/java/sample/JavaImplementationActivator.java?view=diff&rev=547900&r1=547899&r2=547900
==============================================================================
--- incubator/tuscany/java/sca/samples/spi-implementation-pojo/src/main/java/sample/JavaImplementationActivator.java
(original)
+++ incubator/tuscany/java/sca/samples/spi-implementation-pojo/src/main/java/sample/JavaImplementationActivator.java
Sat Jun 16 03:29:02 2007
@@ -31,16 +31,16 @@
 
     private static final QName IMPLEMENTATION_JAVA = new QName(Constants.SCA_NS, "implementation.java");
     
-    public InvokerFactory createInvokerFactory(RuntimeComponent rc, ComponentType ct, JavaImplementation
implementation) {
-        return new JavaInvokerFactory(rc, ct, implementation);
+    public QName getSCDLQName() {
+        return IMPLEMENTATION_JAVA;
     }
 
     public Class<JavaImplementation> getImplementationClass() {
         return JavaImplementation.class;
     }
 
-    public QName getSCDLQName() {
-        return IMPLEMENTATION_JAVA;
+    public InvokerFactory createInvokerFactory(RuntimeComponent rc, ComponentType ct, JavaImplementation
implementation) {
+        return new JavaInvokerFactory(rc, ct, implementation);
     }
 
 }



---------------------------------------------------------------------
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