tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r547880 - in /incubator/tuscany/java/sca/modules/binding-jsonrpc: ./ src/main/java/org/apache/tuscany/sca/binding/jsonrpc/ src/main/resources/ src/main/resources/META-INF/services/ src/test/java/org/apache/tuscany/sca/binding/jsonrpc/util/ ...
Date Sat, 16 Jun 2007 07:46:19 GMT
Author: antelder
Date: Sat Jun 16 00:46:18 2007
New Revision: 547880

URL: http://svn.apache.org/viewvc?view=rev&rev=547880
Log:
Move json binding to binding spi

Added:
    incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBindingActivator.java
  (with props)
    incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCServiceListener.java
      - copied, changed from r547588, incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCServiceBindingProvider.java
    incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.spi.BindingActivator
      - copied, changed from r547588, incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator
    incubator/tuscany/java/sca/modules/binding-jsonrpc/src/test/resources/
    incubator/tuscany/java/sca/modules/binding-jsonrpc/src/test/resources/JSONRPCBinding.composite
      - copied unchanged from r547588, incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/resources/JSONRPCBinding.composite
Removed:
    incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/AbstractBinding.java
    incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCModuleActivator.java
    incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCSCDLProcessor.java
    incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCServiceBindingProvider.java
    incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/resources/JSONRPCBinding.composite
    incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator
    incubator/tuscany/java/sca/modules/binding-jsonrpc/src/test/java/org/apache/tuscany/sca/binding/jsonrpc/util/
Modified:
    incubator/tuscany/java/sca/modules/binding-jsonrpc/pom.xml
    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/ScaDomainScriptServlet.java

Modified: incubator/tuscany/java/sca/modules/binding-jsonrpc/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jsonrpc/pom.xml?view=diff&rev=547880&r1=547879&r2=547880
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jsonrpc/pom.xml (original)
+++ incubator/tuscany/java/sca/modules/binding-jsonrpc/pom.xml Sat Jun 16 00:46:18 2007
@@ -29,13 +29,6 @@
     <artifactId>tuscany-binding-jsonrpc</artifactId>
     <name>Apache Tuscany JSON-RPC Binding</name>
 
-    <repositories>
-       <repository>
-          <id>apache.incubator</id>
-          <url>http://people.apache.org/repo/m2-incubating-repository</url>
-       </repository>
-    </repositories>
-
     <dependencies>
         <dependency>
             <groupId>com.metaparadigm</groupId>
@@ -51,27 +44,10 @@
 	        <scope>test</scope>
         </dependency>
      
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>sca-api</artifactId>
-            <version>1.0-incubating-SNAPSHOT</version>
-        </dependency>        
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-assembly</artifactId>
-            <version>1.0-incubating-SNAPSHOT</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-core-spi</artifactId>
-            <version>1.0-incubating-SNAPSHOT</version>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-host-embedded</artifactId>
+            <artifactId>tuscany-extension-helper</artifactId>
             <version>1.0-incubating-SNAPSHOT</version>
         </dependency>
 
@@ -114,6 +90,7 @@
             <version>4.2</version>
             <scope>test</scope>
         </dependency>
+
         <dependency>
 	        <groupId>httpunit</groupId>
 	        <artifactId>httpunit</artifactId>

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=547880&r1=547879&r2=547880
==============================================================================
--- 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
Sat Jun 16 00:46:18 2007
@@ -19,6 +19,8 @@
 
 package org.apache.tuscany.sca.binding.jsonrpc;
 
+import org.apache.tuscany.sca.spi.utils.AbstractBinding;
+
 /**
  * A model for the JSONRPC binding.
  */

Added: 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=auto&rev=547880
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBindingActivator.java
(added)
+++ incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCBindingActivator.java
Sat Jun 16 00:46:18 2007
@@ -0,0 +1,61 @@
+/*
+ * 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.jsonrpc;
+
+import static org.osoa.sca.Constants.SCA_NS;
+
+import javax.xml.namespace.QName;
+
+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;
+import org.osoa.sca.ServiceRuntimeException;
+
+public class JSONRPCBindingActivator implements BindingActivator<JSONRPCBinding> {
+
+    protected ServletHost servletHost;
+
+    protected static final QName JSONRPC_BINDING_QN = new QName(SCA_NS, "binding.jsonrpc");
+
+    public JSONRPCBindingActivator(ServletHost servletHost) {
+        this.servletHost = servletHost;
+    }
+
+    public QName getSCDLQName() {
+        return JSONRPC_BINDING_QN;
+    }
+
+    public Class<JSONRPCBinding> getBindingClass() {
+        return JSONRPCBinding.class;
+    }
+
+    public ReferenceInvokerFactory 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);
+    }
+
+}

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

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

Copied: incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCServiceListener.java
(from r547588, incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCServiceBindingProvider.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCServiceListener.java?view=diff&rev=547880&p1=incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCServiceBindingProvider.java&r1=547588&p2=incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCServiceListener.java&r2=547880
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCServiceBindingProvider.java
(original)
+++ incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/java/org/apache/tuscany/sca/binding/jsonrpc/JSONRPCServiceListener.java
Sat Jun 16 00:46:18 2007
@@ -21,11 +21,10 @@
 
 import org.apache.tuscany.sca.http.ServletHost;
 import org.apache.tuscany.sca.interfacedef.Interface;
-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;
 
 /**
  * Implementation of the JSONRPC binding provider.
@@ -34,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 JSONRPCServiceBindingProvider implements ServiceBindingProvider {
+public class JSONRPCServiceListener implements ServiceListener {
 
     private RuntimeComponent component;
     private RuntimeComponentService service;
@@ -49,7 +48,7 @@
     public static final String SCA_DOMAIN_SCRIPT = SERVICE_PREFIX + "scaDomain.js";
 
 
-    public JSONRPCServiceBindingProvider(RuntimeComponent component,
+    public JSONRPCServiceListener(RuntimeComponent component,
                                          RuntimeComponentService service,
                                          JSONRPCBinding binding,
                                          ServletHost servletHost) {
@@ -59,10 +58,6 @@
         this.servletHost = servletHost;
     }
 
-    public InterfaceContract getBindingInterfaceContract() {
-        return service.getInterfaceContract();
-    }
-
     public void start() {
         
         // Create and register a servlet for this service
@@ -101,7 +96,7 @@
         }
     }
 
-    private Class<?> getTargetJavaClass(Interface targetInterface) {
+    protected Class<?> getTargetJavaClass(Interface targetInterface) {
         // TODO: right now assume that the target is always a Java
         // Implementation. Need to figure out  how to generate Java
         // Interface in cases where the target is not a Java Implementation

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=547880&r1=547879&r2=547880
==============================================================================
--- 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 00:46:18 2007
@@ -29,7 +29,7 @@
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
 
-import static org.apache.tuscany.sca.binding.jsonrpc.JSONRPCServiceBindingProvider.SERVICE_PREFIX;
+import static org.apache.tuscany.sca.binding.jsonrpc.JSONRPCServiceListener.SERVICE_PREFIX;
 
 /**
  * Servlet to handle requests for the scaDomain.js script.

Copied: incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.spi.BindingActivator
(from r547588, incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.spi.BindingActivator?view=diff&rev=547880&p1=incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator&r1=547588&p2=incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.spi.BindingActivator&r2=547880
==============================================================================
--- incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator
(original)
+++ incubator/tuscany/java/sca/modules/binding-jsonrpc/src/main/resources/META-INF/services/org.apache.tuscany.sca.spi.BindingActivator
Sat Jun 16 00:46:18 2007
@@ -15,4 +15,4 @@
 # specific language governing permissions and limitations
 # under the License. 
 # Implementation class for the ExtensionActivator
-org.apache.tuscany.sca.binding.jsonrpc.JSONRPCModuleActivator
+org.apache.tuscany.sca.binding.jsonrpc.JSONRPCBindingActivator



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