Author: lresende
Date: Mon May  4 06:56:23 2009
New Revision: 771205

URL: http://svn.apache.org/viewvc?rev=771205&view=rev
Log:
TUSCANY-2968 - JSONRPC operation selector

Added:
    
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/
    
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/
    
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/
    
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorInterceptor.java
   (with props)
    
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorProviderFactory.java
   (with props)
    
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorServiceProvider.java
   (with props)
    
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.OperationSelectorProviderFactory
Modified:
    
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/pom.xml
    
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/resources/JSONRPCBinding.composite
    tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/pom.xml
    tuscany/branches/sca-java-1.x/modules/binding-http-new-runtime/pom.xml
    tuscany/branches/sca-java-1.x/modules/binding-http-new/pom.xml

Modified: 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/pom.xml
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/pom.xml?rev=771205&r1=771204&r2=771205&view=diff
==============================================================================
--- 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/pom.xml 
(original)
+++ 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/pom.xml 
Mon May  4 06:56:23 2009
@@ -26,7 +26,7 @@
         <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <artifactId>tuscany-binding-http-oasis-jsonrpc-runtime</artifactId>
+    <artifactId>tuscany-binding-http-new-jsonrpc-runtime</artifactId>
     <name>Apache Tuscany SCA HTTP Binding JSON-RPC Runtime</name>
 
     <dependencies>
@@ -44,7 +44,7 @@
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-binding-http-oasis-jsonrpc</artifactId>
+            <artifactId>tuscany-binding-http-new-jsonrpc</artifactId>
             <version>1.6-SNAPSHOT</version>
         </dependency>        
 

Added: 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorInterceptor.java
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorInterceptor.java?rev=771205&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorInterceptor.java
 (added)
+++ 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorInterceptor.java
 Mon May  4 06:56:23 2009
@@ -0,0 +1,52 @@
+/*
+ * 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.http.operationselector.jsonrpc.provider;
+
+import org.apache.tuscany.sca.binding.http.HTTPBinding;
+import org.apache.tuscany.sca.invocation.Interceptor;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.invocation.Message;
+import org.apache.tuscany.sca.runtime.RuntimeWire;
+
+public class JSONRPCOperationSelectorInterceptor implements Interceptor {
+    private Invoker next;
+    
+    private RuntimeWire runtimeWire;
+    private HTTPBinding binding;
+    
+    public JSONRPCOperationSelectorInterceptor(HTTPBinding binding, 
RuntimeWire runtimeWire) {
+        this.binding = binding;
+        this.runtimeWire = runtimeWire;
+        
+    }
+
+    public Invoker getNext() {
+        return null;
+    }
+
+    public void setNext(Invoker next) {
+        
+    }
+
+    public Message invoke(Message msg) {
+        return null;
+    }
+
+}

Propchange: 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorInterceptor.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorInterceptor.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorProviderFactory.java
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorProviderFactory.java?rev=771205&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorProviderFactory.java
 (added)
+++ 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorProviderFactory.java
 Mon May  4 06:56:23 2009
@@ -0,0 +1,47 @@
+/*
+ * 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.http.operationselector.jsonrpc.provider;
+
+import org.apache.tuscany.sca.assembly.Binding;
+import 
org.apache.tuscany.sca.binding.http.operationselector.jsonrpc.JSONRPCOperationSelector;
+import org.apache.tuscany.sca.provider.OperationSelectorProvider;
+import org.apache.tuscany.sca.provider.OperationSelectorProviderFactory;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
+import org.apache.tuscany.sca.runtime.RuntimeComponentService;
+
+public class JSONRPCOperationSelectorProviderFactory implements 
OperationSelectorProviderFactory<JSONRPCOperationSelector> {
+
+    public OperationSelectorProvider 
createReferenceOperationSelectorProvider(RuntimeComponent component,
+                                                                              
RuntimeComponentReference reference,
+                                                                              
Binding binding) {
+        return null;
+    }
+
+    public OperationSelectorProvider 
createServiceOperationSelectorProvider(RuntimeComponent component,
+                                                                            
RuntimeComponentService service,
+                                                                            
Binding binding) {
+        return new JSONRPCOperationSelectorServiceProvider(component, service, 
binding);
+    }
+
+    public Class<JSONRPCOperationSelector> getModelType() {
+        return JSONRPCOperationSelector.class;
+    }
+}

Propchange: 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorProviderFactory.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorProviderFactory.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorServiceProvider.java
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorServiceProvider.java?rev=771205&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorServiceProvider.java
 (added)
+++ 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorServiceProvider.java
 Mon May  4 06:56:23 2009
@@ -0,0 +1,50 @@
+/*
+ * 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.http.operationselector.jsonrpc.provider;
+
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.binding.http.HTTPBinding;
+import org.apache.tuscany.sca.invocation.Interceptor;
+import org.apache.tuscany.sca.invocation.Phase;
+import org.apache.tuscany.sca.provider.OperationSelectorProvider;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+import org.apache.tuscany.sca.runtime.RuntimeComponentService;
+
+public class JSONRPCOperationSelectorServiceProvider implements 
OperationSelectorProvider {
+    private RuntimeComponent component;
+    private RuntimeComponentService service;
+    private Binding binding;
+
+    public JSONRPCOperationSelectorServiceProvider(RuntimeComponent component, 
RuntimeComponentService service, Binding binding) {
+        super();
+        this.component = component;
+        this.service = service;
+        this.binding = binding;
+    }
+    
+    public Interceptor createInterceptor() {
+        return new JSONRPCOperationSelectorInterceptor((HTTPBinding) binding, 
service.getRuntimeWire(binding));
+    }
+
+    public String getPhase() {
+        return Phase.SERVICE_BINDING_OPERATION_SELECTOR;
+    }
+
+}

Propchange: 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorServiceProvider.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/java/org/apache/tuscany/sca/binding/http/operationselector/jsonrpc/provider/JSONRPCOperationSelectorServiceProvider.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.OperationSelectorProviderFactory
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.OperationSelectorProviderFactory?rev=771205&view=auto
==============================================================================
--- 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.OperationSelectorProviderFactory
 (added)
+++ 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.OperationSelectorProviderFactory
 Mon May  4 06:56:23 2009
@@ -0,0 +1,18 @@
+# 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. 
+
+org.apache.tuscany.sca.binding.http.operationselector.jsonrpc.provider.JSONRPCOperationSelectorPropProviderFactory;model=org.apache.tuscany.sca.binding.http.operationselector.jsonrpc.JSONRPCOperationSelector

Modified: 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/resources/JSONRPCBinding.composite
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/resources/JSONRPCBinding.composite?rev=771205&r1=771204&r2=771205&view=diff
==============================================================================
--- 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/resources/JSONRPCBinding.composite
 (original)
+++ 
tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc-runtime/src/test/resources/JSONRPCBinding.composite
 Mon May  4 06:56:23 2009
@@ -19,15 +19,16 @@
 -->
 <composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
        targetNamespace="http://jsonrpc";
+       xmlns:tuscany="http://tuscany.apache.org/xmlns/sca/1.0";
        xmlns:jsonrpc="http://jsonrpc";
        name="JSONRPCBinding">
 
     <service name="EchoService" promote="EchoComponent">
         <interface.java interface="echo.Echo"/>
-        <binding.http uri="http://localhost:8085/SCADomain/EchoService";>
-           <wireFormat.jsonrpc/>
-           <operationSelector.jsonrpc/>
-        </binding.http>
+        <tuscany:binding.http 
uri="http://localhost:8085/SCADomain/EchoService";>
+           <tuscany:wireFormat.jsonrpc/>
+           <tuscany:operationSelector.jsonrpc/>
+        </tuscany:binding.http>
     </service>
 
     <component name="EchoComponent">

Modified: tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/pom.xml
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/pom.xml?rev=771205&r1=771204&r2=771205&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/pom.xml 
(original)
+++ tuscany/branches/sca-java-1.x/modules/binding-http-new-jsonrpc/pom.xml Mon 
May  4 06:56:23 2009
@@ -26,7 +26,7 @@
         <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <artifactId>tuscany-binding-http-oasis-jsonrpc</artifactId>
+    <artifactId>tuscany-binding-http-new-jsonrpc</artifactId>
     <name>Apache Tuscany SCA HTTP Binding JSON-RPC Model</name>
 
     <dependencies>
@@ -44,7 +44,7 @@
 
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-binding-http-oasis</artifactId>
+            <artifactId>tuscany-binding-http-new</artifactId>
             <version>1.6-SNAPSHOT</version>
         </dependency>        
 

Modified: tuscany/branches/sca-java-1.x/modules/binding-http-new-runtime/pom.xml
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/binding-http-new-runtime/pom.xml?rev=771205&r1=771204&r2=771205&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/binding-http-new-runtime/pom.xml 
(original)
+++ tuscany/branches/sca-java-1.x/modules/binding-http-new-runtime/pom.xml Mon 
May  4 06:56:23 2009
@@ -26,13 +26,13 @@
         <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <artifactId>tuscany-binding-http-oasis-runtime</artifactId>
-    <name>Apache Tuscany SCA HTTP OASIS Binding Runtime</name>
+    <artifactId>tuscany-binding-http-new-runtime</artifactId>
+    <name>Apache Tuscany SCA HTTP Binding Runtime</name>
 
     <dependencies>
         <dependency>
             <groupId>org.apache.tuscany.sca</groupId>
-            <artifactId>tuscany-binding-http-oasis</artifactId>
+            <artifactId>tuscany-binding-http-new</artifactId>
             <version>1.6-SNAPSHOT</version>
         </dependency>
 

Modified: tuscany/branches/sca-java-1.x/modules/binding-http-new/pom.xml
URL: 
http://svn.apache.org/viewvc/tuscany/branches/sca-java-1.x/modules/binding-http-new/pom.xml?rev=771205&r1=771204&r2=771205&view=diff
==============================================================================
--- tuscany/branches/sca-java-1.x/modules/binding-http-new/pom.xml (original)
+++ tuscany/branches/sca-java-1.x/modules/binding-http-new/pom.xml Mon May  4 
06:56:23 2009
@@ -26,8 +26,8 @@
         <relativePath>../pom.xml</relativePath>
     </parent>
 
-    <artifactId>tuscany-binding-http-oasis</artifactId>
-    <name>Apache Tuscany SCA HTTP OASIS Binding Model</name>
+    <artifactId>tuscany-binding-http-new</artifactId>
+    <name>Apache Tuscany SCA HTTP Binding Model</name>
 
     <dependencies>
         <dependency>


Reply via email to