You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by an...@apache.org on 2009/04/07 15:16:59 UTC

svn commit: r762760 - in /tuscany/java/sca/modules/node-impl/src/main: java/org/apache/tuscany/sca/node/impl/ resources/META-INF/services/

Author: antelder
Date: Tue Apr  7 13:16:58 2009
New Revision: 762760

URL: http://svn.apache.org/viewvc?rev=762760&view=rev
Log:
Initial support for the SCAClient API, probably better ways we can do this but this is the simplest way to get it working as a starting point

Added:
    tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCAClientFactoryImpl.java   (with props)
    tuscany/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.oasisopen.sca.client.SCAClientFactory
Modified:
    tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java

Modified: tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java?rev=762760&r1=762759&r2=762760&view=diff
==============================================================================
--- tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java (original)
+++ tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java Tue Apr  7 13:16:58 2009
@@ -95,8 +95,11 @@
 import org.apache.tuscany.sca.workspace.builder.ContributionBuilder;
 import org.apache.tuscany.sca.workspace.builder.ContributionBuilderExtensionPoint;
 import org.oasisopen.sca.CallableReference;
+import org.oasisopen.sca.NoSuchDomainException;
+import org.oasisopen.sca.NoSuchServiceException;
 import org.oasisopen.sca.ServiceReference;
 import org.oasisopen.sca.ServiceRuntimeException;
+import org.oasisopen.sca.client.SCAClient;
 
 
 /**
@@ -104,7 +107,7 @@
  *
  * @version $Rev$ $Date$
  */
-public class NodeImpl implements Node, Client {
+public class NodeImpl implements Node, Client, SCAClient {
 
     private static final String SCA11_TUSCANY_NS = "http://tuscany.apache.org/xmlns/sca/1.1";
 
@@ -766,4 +769,8 @@
     public ExtensionPointRegistry getExtensionPoints() {
         return extensionPoints;
     }
+
+    public <T> T getService(Class<T> businessInterface, String serviceName, URI domainURI) throws NoSuchServiceException, NoSuchDomainException {
+        return getService(businessInterface, serviceName);
+    }
 }

Added: tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCAClientFactoryImpl.java
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCAClientFactoryImpl.java?rev=762760&view=auto
==============================================================================
--- tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCAClientFactoryImpl.java (added)
+++ tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCAClientFactoryImpl.java Tue Apr  7 13:16:58 2009
@@ -0,0 +1,34 @@
+/*
+ * 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.node.impl;
+
+import org.oasisopen.sca.client.SCAClient;
+import org.oasisopen.sca.client.SCAClientFactory;
+
+public class SCAClientFactoryImpl extends SCAClientFactory {
+
+    @Override
+    protected SCAClient createSCAClient() {
+        NodeImpl nodeImpl = new NodeImpl();
+        nodeImpl.start();
+        return nodeImpl;
+    }
+
+}

Propchange: tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCAClientFactoryImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: tuscany/java/sca/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/SCAClientFactoryImpl.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: tuscany/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.oasisopen.sca.client.SCAClientFactory
URL: http://svn.apache.org/viewvc/tuscany/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.oasisopen.sca.client.SCAClientFactory?rev=762760&view=auto
==============================================================================
--- tuscany/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.oasisopen.sca.client.SCAClientFactory (added)
+++ tuscany/java/sca/modules/node-impl/src/main/resources/META-INF/services/org.oasisopen.sca.client.SCAClientFactory Tue Apr  7 13:16:58 2009
@@ -0,0 +1 @@
+org.apache.tuscany.sca.node.impl.SCAClientFactoryImpl