tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r544134 - in /incubator/tuscany/java/sca/modules/binding-ajax: ./ src/main/java/org/apache/tuscany/sca/binding/ajax/ src/main/resources/META-INF/services/
Date Mon, 04 Jun 2007 11:53:15 GMT
Author: antelder
Date: Mon Jun  4 04:53:13 2007
New Revision: 544134

URL: http://svn.apache.org/viewvc?view=rev&rev=544134
Log:
Change to use extension-helper

Added:
    incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxBindingActivator.java
  (with props)
    incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxInvoker.java
      - copied, changed from r544084, incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxReferenceInvoker.java
    incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxInvokerFactory.java
      - copied, changed from r544084, incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxReferenceBindingProvider.java
    incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxServiceListener.java
      - copied, changed from r544084, incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxServiceBindingProvider.java
    incubator/tuscany/java/sca/modules/binding-ajax/src/main/resources/META-INF/services/org.apache.tuscany.sca.spi.BindingActivator
      - copied, changed from r544102, incubator/tuscany/java/sca/modules/binding-ajax/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator
Removed:
    incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AbstractBinding.java
    incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxBindingSCDLProcessor.java
    incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxModuleActivator.java
    incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxReferenceBindingProvider.java
    incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxReferenceInvoker.java
    incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxServiceBindingProvider.java
    incubator/tuscany/java/sca/modules/binding-ajax/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator
Modified:
    incubator/tuscany/java/sca/modules/binding-ajax/pom.xml
    incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxBinding.java

Modified: incubator/tuscany/java/sca/modules/binding-ajax/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ajax/pom.xml?view=diff&rev=544134&r1=544133&r2=544134
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ajax/pom.xml (original)
+++ incubator/tuscany/java/sca/modules/binding-ajax/pom.xml Mon Jun  4 04:53:13 2007
@@ -34,7 +34,7 @@
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-host-embedded</artifactId>
+            <artifactId>tuscany-extension-helper</artifactId>
             <version>1.0-incubating-SNAPSHOT</version>
         </dependency>
 

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=544134&r1=544133&r2=544134
==============================================================================
--- 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  4 04:53:13 2007
@@ -19,12 +19,14 @@
 
 package org.apache.tuscany.sca.binding.ajax;
 
+import org.apache.tuscany.sca.spi.utils.AbstractBinding;
+
+
 /**
  * The runtime representation of the <binding.ajax> SCDL
- * 
- * Empty as <binding.ajax> doesn't use any additional 
- * attributes or elements (yet).
  */
 public class AjaxBinding extends AbstractBinding {
 
+    // Empty as <binding.ajax> doesn't use any additional attributes or elements (yet).
+    
 }

Added: 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=auto&rev=544134
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxBindingActivator.java
(added)
+++ incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxBindingActivator.java
Mon Jun  4 04:53:13 2007
@@ -0,0 +1,59 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.apache.tuscany.sca.binding.ajax;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.sca.assembly.xml.Constants;
+import org.apache.tuscany.sca.http.ServletHost;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+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;
+
+public class AjaxBindingActivator implements BindingActivator<AjaxBinding>{
+
+    private ServletHost servletHost;
+    
+    public static QName AJAX_BINDING_QNAME = new QName(Constants.SCA10_NS, "binding.ajax");
+
+    public AjaxBindingActivator(ServletHost servletHost) {
+        this.servletHost = servletHost;
+    }
+
+    public Class<AjaxBinding> getBindingClass() {
+        return AjaxBinding.class;
+    }
+
+    public QName getSCDLQName() {
+        return AJAX_BINDING_QNAME;
+    }
+
+    public ReferenceInvokerFactory 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);
+    }
+
+}

Propchange: incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxBindingActivator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxBindingActivator.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Copied: incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxInvoker.java
(from r544084, incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxReferenceInvoker.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxInvoker.java?view=diff&rev=544134&p1=incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxReferenceInvoker.java&r1=544084&p2=incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxInvoker.java&r2=544134
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxReferenceInvoker.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxInvoker.java
Mon Jun  4 04:53:13 2007
@@ -30,11 +30,11 @@
 import org.directwebremoting.WebContextFactory;
 import org.directwebremoting.proxy.dwr.Util;
 
-public class AjaxReferenceInvoker implements Invoker {
+public class AjaxInvoker implements Invoker {
 
     protected String referenceFunction;
     
-    AjaxReferenceInvoker(String referenceName, Operation operation) {
+    public AjaxInvoker(String referenceName, Operation operation) {
         this.referenceFunction = referenceName + "." + operation.getName();
     }
 

Copied: incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxInvokerFactory.java
(from r544084, incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxReferenceBindingProvider.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=544134&p1=incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxReferenceBindingProvider.java&r1=544084&p2=incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxInvokerFactory.java&r2=544134
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxReferenceBindingProvider.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxInvokerFactory.java
Mon Jun  4 04:53:13 2007
@@ -19,33 +19,31 @@
 
 package org.apache.tuscany.sca.binding.ajax;
 
-import static org.apache.tuscany.sca.binding.ajax.AjaxServiceBindingProvider.SERVLET_PATH;
+import static org.apache.tuscany.sca.binding.ajax.AjaxServiceListener.SERVLET_PATH;
 
-import org.apache.tuscany.sca.assembly.Binding;
 import org.apache.tuscany.sca.http.ServletHost;
-import org.apache.tuscany.sca.interfacedef.InterfaceContract;
 import org.apache.tuscany.sca.interfacedef.Operation;
 import org.apache.tuscany.sca.invocation.Invoker;
-import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
 import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
+import org.apache.tuscany.sca.spi.ReferenceInvokerFactory;
 
-public class AjaxReferenceBindingProvider implements ReferenceBindingProvider {
+public class AjaxInvokerFactory implements ReferenceInvokerFactory {
 
     protected RuntimeComponent runtimeComponent;
     protected RuntimeComponentReference runtimeComponentReference;
-    protected Binding binding; 
+    protected AjaxBinding binding; 
     protected ServletHost servletHost;
     
-    public AjaxReferenceBindingProvider(RuntimeComponent rc, RuntimeComponentReference rcr,
Binding b, ServletHost servletHost) {
+    public AjaxInvokerFactory(RuntimeComponent rc, RuntimeComponentReference rcr, AjaxBinding
b, ServletHost servletHost) {
         this.runtimeComponent = rc;
         this.runtimeComponentReference = rcr;
         this.binding = b;
         this.servletHost = servletHost;
     }
 
-    public Invoker createInvoker(Operation operation, boolean arg1) {
-        return new AjaxReferenceInvoker(binding.getName(), operation);
+    public Invoker createInvoker(Operation operation) {
+        return new AjaxInvoker(binding.getName(), operation);
     }
 
     public void start() {
@@ -64,10 +62,6 @@
 
     public void stop() {
         servletHost.removeServletMapping(SERVLET_PATH);
-    }
-
-    public InterfaceContract getBindingInterfaceContract() {
-        return runtimeComponentReference.getInterfaceContract();
     }
 
 }

Copied: incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxServiceListener.java
(from r544084, incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxServiceBindingProvider.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxServiceListener.java?view=diff&rev=544134&p1=incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxServiceBindingProvider.java&r1=544084&p2=incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxServiceListener.java&r2=544134
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxServiceBindingProvider.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-ajax/src/main/java/org/apache/tuscany/sca/binding/ajax/AjaxServiceListener.java
Mon Jun  4 04:53:13 2007
@@ -21,32 +21,27 @@
 
 import org.apache.tuscany.sca.assembly.Binding;
 import org.apache.tuscany.sca.http.ServletHost;
-import org.apache.tuscany.sca.interfacedef.InterfaceContract;
 import org.apache.tuscany.sca.interfacedef.java.JavaInterface;
-import org.apache.tuscany.sca.provider.ServiceBindingProvider;
 import org.apache.tuscany.sca.runtime.RuntimeComponent;
 import org.apache.tuscany.sca.runtime.RuntimeComponentService;
+import org.apache.tuscany.sca.spi.ServiceListener;
 
-public class AjaxServiceBindingProvider implements ServiceBindingProvider {
+public class AjaxServiceListener implements ServiceListener {
 
-    protected RuntimeComponent runtimeComponent;
-    protected RuntimeComponentService runtimeComponentService;
-    protected Binding binding; 
+    RuntimeComponent rc;
+    RuntimeComponentService rcs;
+    Binding binding;
     protected ServletHost servletHost;
     
     public static final String SERVLET_PATH = AjaxServlet.AJAX_SERVLET_PATH + "/*";
 
-    public AjaxServiceBindingProvider(RuntimeComponent rc, RuntimeComponentService rcs, Binding
b, ServletHost servletHost) {
-        this.runtimeComponent = rc;
-        this.runtimeComponentService = rcs;
-        this.binding = b;
+    public AjaxServiceListener(RuntimeComponent rc, RuntimeComponentService rcs, Binding
binding, ServletHost servletHost) {
+        this.rc = rc;
+        this.rcs = rcs;
+        this.binding = binding;
         this.servletHost = servletHost;
     }
 
-    public InterfaceContract getBindingInterfaceContract() {
-        return runtimeComponentService.getInterfaceContract();
-    }
-
     public void start() {
         
         // there is no "getServlet" method on ServletHost so this has to use remove/add
@@ -56,8 +51,8 @@
             servlet = new AjaxServlet();
         }
         
-        Class<?> type = ((JavaInterface)runtimeComponentService.getInterfaceContract().getInterface()).getJavaClass();
-        Object instance = runtimeComponent.createSelfReference(type).getService();
+        Class<?> type = ((JavaInterface)rcs.getInterfaceContract().getInterface()).getJavaClass();
+        Object instance = rc.createSelfReference(type).getService();
 
         servlet.addService(binding.getName(), type, instance);
 

Copied: incubator/tuscany/java/sca/modules/binding-ajax/src/main/resources/META-INF/services/org.apache.tuscany.sca.spi.BindingActivator
(from r544102, incubator/tuscany/java/sca/modules/binding-ajax/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-ajax/src/main/resources/META-INF/services/org.apache.tuscany.sca.spi.BindingActivator?view=diff&rev=544134&p1=incubator/tuscany/java/sca/modules/binding-ajax/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator&r1=544102&p2=incubator/tuscany/java/sca/modules/binding-ajax/src/main/resources/META-INF/services/org.apache.tuscany.sca.spi.BindingActivator&r2=544134
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-ajax/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator
(original)
+++ incubator/tuscany/java/sca/modules/binding-ajax/src/main/resources/META-INF/services/org.apache.tuscany.sca.spi.BindingActivator
Mon Jun  4 04:53:13 2007
@@ -15,4 +15,5 @@
 # specific language governing permissions and limitations
 # under the License.
 # Implementation class for the ExtensionActivator
-org.apache.tuscany.sca.binding.ajax.AjaxModuleActivator
+org.apache.tuscany.sca.binding.ajax.AjaxBindingActivator
+



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