tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r548371 - in /incubator/tuscany/java/sca/modules: binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/ binding-ejb/src/main/java/org/apache/tuscany/sca/binding/ejb/ binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jso...
Date Mon, 18 Jun 2007 14:45:16 GMT
Author: antelder
Date: Mon Jun 18 07:45:15 2007
New Revision: 548371

URL: http://svn.apache.org/viewvc?view=rev&rev=548371
Log:
extension helper: switch to pojo binding classes

Modified:
    incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxBinding.java
    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-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxService.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/JSONRPCBinding.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/JSONRPCService.java
    incubator/tuscany/java/sca/modules/binding-rmi/src/main/java/org/apache/tuscany/sca/binding/rmi/RMIBindingActivator.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

Modified: incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxBinding.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxBinding.java?view=diff&rev=548371&r1=548370&r2=548371
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxBinding.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxBinding.java
Mon Jun 18 07:45:15 2007
@@ -19,14 +19,13 @@
 
 package org.apache.tuscany.sca.binding.ajax;
 
-import org.apache.tuscany.sca.spi.utils.AbstractBinding;
 
 
 
 /**
  * The runtime representation of the <binding.ajax> SCDL
  */
-public class AjaxBinding extends AbstractBinding {
+public class AjaxBinding {
 
     // Empty as <binding.ajax> doesn't use any additional attributes or elements (yet).
     

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=548371&r1=548370&r2=548371
==============================================================================
--- 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
Mon Jun 18 07:45:15 2007
@@ -19,6 +19,7 @@
 
 package org.apache.tuscany.sca.binding.ajax;
 
+import org.apache.tuscany.sca.assembly.Binding;
 import org.apache.tuscany.sca.http.ServletHost;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
 import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
@@ -39,12 +40,17 @@
         return AjaxBinding.class;
     }
 
-    public InvokerFactory createInvokerFactory(RuntimeComponent rc, RuntimeComponentReference
rcr, AjaxBinding binding) {
-        return new AjaxInvokerFactory(rc, rcr, binding, servletHost);
+    public InvokerFactory createInvokerFactory(RuntimeComponent rc, RuntimeComponentReference
rcr, Binding b, AjaxBinding ab) {
+        return new AjaxInvokerFactory(rc, rcr, b, ab, servletHost);
+    }
+
+    public ComponentLifecycle createService(RuntimeComponent rc, RuntimeComponentService
rcs, Binding b, AjaxBinding ab) {
+        return new AjaxService(rc, rcs, b, ab, servletHost);
     }
 
-    public ComponentLifecycle createService(RuntimeComponent rc, RuntimeComponentService
rcs, AjaxBinding binding) {
-        return new AjaxService(rc, rcs, binding, servletHost);
+    public InvokerFactory createInvokerFactory(RuntimeComponent rc, RuntimeComponentReference
rcr, AjaxBinding binding) {
+        // TODO Auto-generated method stub
+        return null;
     }
 
 }

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=548371&r1=548370&r2=548371
==============================================================================
--- 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
Mon Jun 18 07:45:15 2007
@@ -21,22 +21,23 @@
 
 import static org.apache.tuscany.sca.binding.ajax.AjaxService.SERVLET_PATH;
 
+import org.apache.tuscany.sca.assembly.Binding;
 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.InvokerFactory;
 import org.apache.tuscany.sca.spi.ComponentLifecycle;
+import org.apache.tuscany.sca.spi.InvokerFactory;
 
 public class AjaxInvokerFactory implements InvokerFactory, ComponentLifecycle {
 
     protected RuntimeComponent runtimeComponent;
     protected RuntimeComponentReference runtimeComponentReference;
-    protected AjaxBinding binding; 
+    protected Binding binding;
     protected ServletHost servletHost;
     
-    public AjaxInvokerFactory(RuntimeComponent rc, RuntimeComponentReference rcr, AjaxBinding
b, ServletHost servletHost) {
+    public AjaxInvokerFactory(RuntimeComponent rc, RuntimeComponentReference rcr, Binding
b, AjaxBinding ab, ServletHost servletHost) {
         this.runtimeComponent = rc;
         this.runtimeComponentReference = rcr;
         this.binding = b;

Modified: incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxService.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=548371&r1=548370&r2=548371
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxService.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxService.java
Mon Jun 18 07:45:15 2007
@@ -19,6 +19,7 @@
 
 package org.apache.tuscany.sca.binding.ajax;
 
+import org.apache.tuscany.sca.assembly.Binding;
 import org.apache.tuscany.sca.http.ServletHost;
 import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
@@ -29,12 +30,12 @@
 
     RuntimeComponent rc;
     RuntimeComponentService rcs;
-    AjaxBinding binding;
+    Binding binding;
     protected ServletHost servletHost;
     
     public static final String SERVLET_PATH = AjaxServlet.AJAX_SERVLET_PATH + "/*";
 
-    public AjaxService(RuntimeComponent rc, RuntimeComponentService rcs, AjaxBinding binding,
ServletHost servletHost) {
+    public AjaxService(RuntimeComponent rc, RuntimeComponentService rcs, Binding binding,
AjaxBinding ab, 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=548371&r1=548370&r2=548371
==============================================================================
--- 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
Mon Jun 18 07:45:15 2007
@@ -19,6 +19,7 @@
 
 package org.apache.tuscany.sca.binding.ejb;
 
+import org.apache.tuscany.sca.assembly.Binding;
 import org.apache.tuscany.sca.interfacedef.Operation;
 import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
 import org.apache.tuscany.sca.invocation.Invoker;
@@ -32,7 +33,7 @@
 
 public class EJBBindingActivator implements BindingActivator<EJBBinding> {
 
-    public InvokerFactory createInvokerFactory(RuntimeComponent rc, RuntimeComponentReference
rcr, final EJBBinding binding) {
+    public InvokerFactory createInvokerFactory(RuntimeComponent rc, RuntimeComponentReference
rcr, final Binding b, final EJBBinding binding) {
         // TODO: assumes a Java interface, need to support tuscany generic Interface
         final Class si = ((JavaInterface)rcr.getInterfaceContract().getInterface()).getJavaClass();
         return new InvokerFactory() {
@@ -42,7 +43,7 @@
          };
     }
 
-    public ComponentLifecycle createService(RuntimeComponent rc, RuntimeComponentService
rcs, EJBBinding binding) {
+    public ComponentLifecycle createService(RuntimeComponent rc, RuntimeComponentService
rcs, Binding b, EJBBinding binding) {
         throw new ServiceRuntimeException("services not yet implemented for binding.ejb");
     }
 

Modified: incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBinding.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBinding.java?view=diff&rev=548371&r1=548370&r2=548371
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBinding.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBinding.java
Mon Jun 18 07:45:15 2007
@@ -24,7 +24,7 @@
 /**
  * A model for the JSONRPC binding.
  */
-public class JSONRPCBinding extends AbstractBinding {
+public class JSONRPCBinding {
     
     // empty as right now the json-rpc binding has no attributes
     

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=548371&r1=548370&r2=548371
==============================================================================
--- 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
Mon Jun 18 07:45:15 2007
@@ -19,6 +19,7 @@
 
 package org.apache.tuscany.sca.binding.jsonrpc;
 
+import org.apache.tuscany.sca.assembly.Binding;
 import org.apache.tuscany.sca.http.ServletHost;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
 import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
@@ -40,12 +41,12 @@
         return JSONRPCBinding.class;
     }
 
-    public InvokerFactory createInvokerFactory(RuntimeComponent rc, RuntimeComponentReference
rcr, JSONRPCBinding binding) {
+    public InvokerFactory createInvokerFactory(RuntimeComponent rc, RuntimeComponentReference
rcr, Binding b, JSONRPCBinding binding) {
         throw new ServiceRuntimeException("SCA reference support not yet implemented");
     }
 
-    public ComponentLifecycle createService(RuntimeComponent rc, RuntimeComponentService
rcs, JSONRPCBinding binding) {
-        return new JSONRPCService(rc, rcs, binding, servletHost);
+    public ComponentLifecycle createService(RuntimeComponent rc, RuntimeComponentService
rcs, Binding b, JSONRPCBinding binding) {
+        return new JSONRPCService(rc, rcs, b, binding, servletHost);
     }
 
 }

Modified: incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCService.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=548371&r1=548370&r2=548371
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCService.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCService.java
Mon Jun 18 07:45:15 2007
@@ -19,6 +19,7 @@
 
 package org.apache.tuscany.sca.binding.jsonrpc;
 
+import org.apache.tuscany.sca.assembly.Binding;
 import org.apache.tuscany.sca.http.ServletHost;
 import org.apache.tuscany.sca.interfacedef.Interface;
 import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
@@ -37,8 +38,9 @@
 
     private RuntimeComponent component;
     private RuntimeComponentService service;
-    private JSONRPCBinding binding;
+    private JSONRPCBinding jsonBinding;
     private ServletHost servletHost;
+    private Binding binding;
 
     public static final String SERVICE_PREFIX = "/SCADomain/";
 
@@ -50,11 +52,13 @@
 
     public JSONRPCService(RuntimeComponent component,
                                          RuntimeComponentService service,
+                                         Binding b,
                                          JSONRPCBinding binding,
                                          ServletHost servletHost) {
         this.component = component;
         this.service = service;
-        this.binding = binding;
+        this.binding = b;
+        this.jsonBinding = binding;
         this.servletHost = servletHost;
     }
 

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=548371&r1=548370&r2=548371
==============================================================================
--- 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
Mon Jun 18 07:45:15 2007
@@ -19,6 +19,7 @@
 
 package org.apache.tuscany.sca.binding.rmi;
 
+import org.apache.tuscany.sca.assembly.Binding;
 import org.apache.tuscany.sca.rmi.RMIHost;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
 import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
@@ -39,11 +40,11 @@
         return RMIBinding.class;
     }
 
-    public InvokerFactory createInvokerFactory(RuntimeComponent rc, RuntimeComponentReference
rcr, RMIBinding binding) {
+    public InvokerFactory createInvokerFactory(RuntimeComponent rc, RuntimeComponentReference
rcr, Binding b, RMIBinding binding) {
         return new RMIReferenceInvokerFactory(rc, rcr, binding, rmiHost);
     }
 
-    public ComponentLifecycle createService(RuntimeComponent rc, RuntimeComponentService
rcs, RMIBinding binding) {
+    public ComponentLifecycle createService(RuntimeComponent rc, RuntimeComponentService
rcs, Binding b, RMIBinding binding) {
         return new RMIService(rc, rcs, binding, rmiHost);
     }
 

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=548371&r1=548370&r2=548371
==============================================================================
--- 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
Mon Jun 18 07:45:15 2007
@@ -19,6 +19,7 @@
 
 package org.apache.tuscany.sca.spi;
 
+import org.apache.tuscany.sca.assembly.Binding;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
 import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
 import org.apache.tuscany.sca.runtime.RuntimeComponentService;
@@ -59,8 +60,8 @@
 
     Class<B> getBindingClass();
 
-    InvokerFactory createInvokerFactory(RuntimeComponent rc, RuntimeComponentReference rcr,
B binding);
+    InvokerFactory createInvokerFactory(RuntimeComponent rc, RuntimeComponentReference rcr,
Binding b, B pojoBinding);
     
-    ComponentLifecycle createService(RuntimeComponent rc, RuntimeComponentService rcs, B
binding);
+    ComponentLifecycle createService(RuntimeComponent rc, RuntimeComponentService rcs, Binding
b, B pojoBinding);
     
 }

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=548371&r1=548370&r2=548371
==============================================================================
--- 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
Mon Jun 18 07:45:15 2007
@@ -26,7 +26,6 @@
 
 import org.apache.tuscany.sca.assembly.AssemblyFactory;
 import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.assembly.Implementation;
 import org.apache.tuscany.sca.assembly.xml.Constants;
 import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessor;
 import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint;
@@ -90,9 +89,9 @@
                             }
                             public void start() {
                                 if (b instanceof PojoBinding) {
-                                    factory = bindingActivator.createInvokerFactory(rc, rcr,
((PojoBinding)b).getUserBinding());
+                                    factory = bindingActivator.createInvokerFactory(rc, rcr,
b, ((PojoBinding)b).getUserBinding());
                                 } else {
-                                    factory = bindingActivator.createInvokerFactory(rc, rcr,
b);
+                                    factory = bindingActivator.createInvokerFactory(rc, rcr,
b, b);
                                 }
                                 if (factory instanceof ComponentLifecycle) {
                                     ((ComponentLifecycle)factory).start();
@@ -111,14 +110,14 @@
                     public ServiceBindingProvider createServiceBindingProvider(final RuntimeComponent
rc,
                                                                                final RuntimeComponentService
rcs,
                                                                                final Binding
b) {
-                        final Object binding;
+                        final Object pojoBinding;
                         if (b instanceof PojoBinding) {
-                            binding = ((PojoBinding)b).getUserBinding();
+                            pojoBinding = ((PojoBinding)b).getUserBinding();
                         } else {
-                            binding = b;
+                            pojoBinding = b;
                         }
                         return new ServiceBindingProvider(){
-                            ComponentLifecycle listener = bindingActivator.createService(rc,
rcs, binding);
+                            ComponentLifecycle listener = bindingActivator.createService(rc,
rcs, b, pojoBinding);
                             public InterfaceContract getBindingInterfaceContract() {
                                 return null;
                             }



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