Added: 
incubator/tuscany/sandbox/mobile-android/host-android/src/test/java/org/apache/tuscany/sca/host/embedded/test/extension/provider/TestImplementationProviderFactory.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/host-android/src/test/java/org/apache/tuscany/sca/host/embedded/test/extension/provider/TestImplementationProviderFactory.java?rev=637729&view=auto
==============================================================================
--- 
incubator/tuscany/sandbox/mobile-android/host-android/src/test/java/org/apache/tuscany/sca/host/embedded/test/extension/provider/TestImplementationProviderFactory.java
 (added)
+++ 
incubator/tuscany/sandbox/mobile-android/host-android/src/test/java/org/apache/tuscany/sca/host/embedded/test/extension/provider/TestImplementationProviderFactory.java
 Sun Mar 16 22:47:18 2008
@@ -0,0 +1,48 @@
+/*
+ * 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.host.embedded.test.extension.provider;
+
+import org.apache.tuscany.sca.host.embedded.test.extension.TestImplementation;
+import org.apache.tuscany.sca.provider.ImplementationProvider;
+import org.apache.tuscany.sca.provider.ImplementationProviderFactory;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+
+
+/**
+ * The model representing a test implementation in an SCA assembly model.
+ * 
+ * @version $$Rev: 608205 $$ $$Date: 2007-04-23 19:18:54 -0700 (Mon, 23 Apr
+ *          2007) $$
+ */
+public class TestImplementationProviderFactory implements 
ImplementationProviderFactory<TestImplementation> {
+
+    /**
+     * Constructs a new test implementation provider factory.
+     */
+    public TestImplementationProviderFactory() {
+    }
+
+    public ImplementationProvider 
createImplementationProvider(RuntimeComponent component, TestImplementation 
implementation) {
+        return new TestImplementationProvider(component, implementation);
+    }
+    
+    public Class<TestImplementation> getModelType() {
+        return TestImplementation.class;
+    }
+}

Added: 
incubator/tuscany/sandbox/mobile-android/host-android/src/test/java/org/apache/tuscany/sca/host/embedded/test/extension/provider/TestInvoker.java
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/host-android/src/test/java/org/apache/tuscany/sca/host/embedded/test/extension/provider/TestInvoker.java?rev=637729&view=auto
==============================================================================
--- 
incubator/tuscany/sandbox/mobile-android/host-android/src/test/java/org/apache/tuscany/sca/host/embedded/test/extension/provider/TestInvoker.java
 (added)
+++ 
incubator/tuscany/sandbox/mobile-android/host-android/src/test/java/org/apache/tuscany/sca/host/embedded/test/extension/provider/TestInvoker.java
 Sun Mar 16 22:47:18 2008
@@ -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.host.embedded.test.extension.provider;
+
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.invocation.Message;
+
+
+/**
+ * Implements an invoker for test component implementations.
+ * 
+ * The target invoker is responsible for handling operation invocations.
+ * 
+ * @version $Rev: 608205 $ $Date: 2008-01-02 12:29:05 -0800 (Wed, 02 Jan 2008) 
$
+ */
+public class TestInvoker implements Invoker {
+    private Operation operation;
+    private String greeting;
+    
+    public TestInvoker(Operation operation, String greeting) {
+        this.operation = operation;
+        this.greeting = greeting;
+    }
+    
+    public Message invoke(Message msg) {
+        Object[] args = msg.getBody();
+        if (operation.getName().equals("ping")) {
+            msg.setBody(greeting + " " + args[0]);
+        } else {
+            msg.setFaultBody(new Exception("Operation " + operation.getName() 
+ " is not supported"));
+        }
+        return msg;
+    }
+}

Added: 
incubator/tuscany/sandbox/mobile-android/host-android/src/test/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/host-android/src/test/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator?rev=637729&view=auto
==============================================================================
--- 
incubator/tuscany/sandbox/mobile-android/host-android/src/test/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator
 (added)
+++ 
incubator/tuscany/sandbox/mobile-android/host-android/src/test/resources/META-INF/services/org.apache.tuscany.sca.core.ModuleActivator
 Sun Mar 16 22:47:18 2008
@@ -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.
+# Implementation class for the ExtensionActivator
+org.apache.tuscany.sca.host.embedded.test.extension.module.TestModuleActivator

Added: 
incubator/tuscany/sandbox/mobile-android/host-android/src/test/resources/test.composite
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/host-android/src/test/resources/test.composite?rev=637729&view=auto
==============================================================================
--- 
incubator/tuscany/sandbox/mobile-android/host-android/src/test/resources/test.composite
 (added)
+++ 
incubator/tuscany/sandbox/mobile-android/host-android/src/test/resources/test.composite
 Sun Mar 16 22:47:18 2008
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    * 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.    
+-->
+<composite xmlns="http://www.osoa.org/xmlns/sca/1.0";
+       targetNamespace="http://test";
+       xmlns:se="http://test";
+       xmlns:e="http://test/extension";
+       name="test">
+
+    <component name="TestServiceComponent">
+        <e:implementation.test greeting="Hello" />
+    </component>
+
+</composite>

Added: 
incubator/tuscany/sandbox/mobile-android/host-android/src/test/resources/test.txt
URL: 
http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/host-android/src/test/resources/test.txt?rev=637729&view=auto
==============================================================================
--- 
incubator/tuscany/sandbox/mobile-android/host-android/src/test/resources/test.txt
 (added)
+++ 
incubator/tuscany/sandbox/mobile-android/host-android/src/test/resources/test.txt
 Sun Mar 16 22:47:18 2008
@@ -0,0 +1,16 @@
+# 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.
\ No newline at end of file



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to