tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r431329 - in /incubator/tuscany/java/sca/bindings/binding.servicemix: ./ src/main/java/org/apache/tuscany/ src/main/java/org/apache/tuscany/servicemix/ src/main/resources/ src/main/resources/META-INF/
Date Mon, 14 Aug 2006 12:30:18 GMT
Author: antelder
Date: Mon Aug 14 05:30:16 2006
New Revision: 431329

URL: http://svn.apache.org/viewvc?rev=431329&view=rev
Log:
Start converting the ServiceMix binding to the new Tuscany runtime

Added:
    incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/
    incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/
    incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/JBIBinding.java
  (with props)
    incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/JBIBindingLoader.java
  (with props)
    incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixBuilder.java
  (with props)
    incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixInvoker.java
  (with props)
    incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixReference.java
  (with props)
    incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixService.java
  (with props)
Removed:
    incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/resources/META-INF/DISCLAIMER
    incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/resources/META-INF/LICENSE
    incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/resources/META-INF/NOTICE
    incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/resources/system.fragment
Modified:
    incubator/tuscany/java/sca/bindings/binding.servicemix/pom.xml

Modified: incubator/tuscany/java/sca/bindings/binding.servicemix/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/bindings/binding.servicemix/pom.xml?rev=431329&r1=431328&r2=431329&view=diff
==============================================================================
--- incubator/tuscany/java/sca/bindings/binding.servicemix/pom.xml (original)
+++ incubator/tuscany/java/sca/bindings/binding.servicemix/pom.xml Mon Aug 14 05:30:16 2006
@@ -17,138 +17,56 @@
  * specific language governing permissions and limitations
  * under the License.    
 -->
-<!-- $Rev$ $Date$ -->
-<project
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0">
-
-  <modelVersion>4.0.0</modelVersion>
-
-  <parent>
-    <groupId>org.apache.servicemix</groupId>
-    <artifactId>servicemix</artifactId>
-    <version>3.0-incubating-SNAPSHOT</version>
-  </parent>
-
-  <artifactId>servicemix-sca</artifactId>
-  <packaging>jbi-component</packaging>
-  <name>ServiceMix :: SCA Service Engine</name>
-  <description>SCA service engine</description>
-
-  <properties>
-    <tuscany_version>20060317</tuscany_version>
-    <eclipse_xsd_version>2.2.0-I200602160000</eclipse_xsd_version>
-    <eclipse_emf_version>2.2.0-I200602160000</eclipse_emf_version>
-  </properties>
-
-  <dependencies>
-
-    <dependency>
-      <groupId>${pom.groupId}</groupId>
-      <artifactId>servicemix-common</artifactId>
-    </dependency>
-
-    <dependency>
-      <groupId>commonj</groupId>
-      <artifactId>sdo-api</artifactId>
-      <version>20060317</version>
-    </dependency>
-    <dependency>
-      <groupId>org.osoa</groupId>
-      <artifactId>sca-api</artifactId>
-      <version>${tuscany_version}</version>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.apache.tuscany</groupId>
-      <artifactId>tuscany-common</artifactId>
-      <version>${tuscany_version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.tuscany</groupId>
-      <artifactId>tuscany-container-java</artifactId>
-      <version>${tuscany_version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.tuscany</groupId>
-      <artifactId>tuscany-core</artifactId>
-      <version>${tuscany_version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.tuscany</groupId>
-      <artifactId>tuscany-model</artifactId>
-      <version>${tuscany_version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.tuscany</groupId>
-      <artifactId>tuscany-sdo-impl</artifactId>
-      <version>${tuscany_version}</version>
-    </dependency>
-    
-    <dependency>
-      <groupId>org.eclipse.emf</groupId>
-      <artifactId>common</artifactId>
-      <version>${eclipse_emf_version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.emf</groupId>
-      <artifactId>ecore</artifactId>
-      <version>${eclipse_emf_version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.emf</groupId>
-      <artifactId>ecore-change</artifactId>
-      <version>${eclipse_emf_version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.emf</groupId>
-      <artifactId>ecore-xmi</artifactId>
-      <version>${eclipse_emf_version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.eclipse.xsd</groupId>
-      <artifactId>xsd</artifactId>
-      <version>${eclipse_xsd_version}</version>
-    </dependency>
-    
-    <dependency>
-      <groupId>com.sun.xml</groupId>
-      <artifactId>jaxb-impl</artifactId>
-      <version>2.0EA3</version>
-    </dependency>
-
-    <dependency>
-      <groupId>junit</groupId>
-      <artifactId>junit</artifactId>
-      <scope>test</scope>
-    </dependency>
-    <dependency>
-      <groupId>${pom.groupId}</groupId>
-      <artifactId>servicemix-core</artifactId>
-      <scope>provided</scope>
-    </dependency>
-  </dependencies>
-
-  <build>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-compiler-plugin</artifactId>
-        <configuration>
-          <source>1.5</source>
-          <target>1.5</target>
-        </configuration>
-      </plugin>
-      <plugin>
-        <groupId>org.apache.servicemix.tooling</groupId>
-        <artifactId>jbi-maven-plugin</artifactId>
-        <configuration>
-          <type>service-engine</type>
-          <bootstrap>org.apache.servicemix.sca.ScaBootstrap</bootstrap>
-          <component>org.apache.servicemix.sca.ScaComponent</component>
-        </configuration>
-      </plugin>
-    </plugins>
-  </build>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+    <parent>
+        <groupId>org.apache.tuscany.bindings</groupId>
+        <artifactId>bindings</artifactId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+
+    <modelVersion>4.0.0</modelVersion>
+    <artifactId>binding-servicemix</artifactId>
+    <name>Apache Tuscany Binding for ServiceMix</name>
+    <description>Implementation of the SCA JBI Binding</description>
+
+    <repositories>
+      <repository>
+        <snapshots>
+          <enabled>true</enabled>
+        </snapshots>
+        <id>apache-nightly-repository</id>
+        <name>Apache Nightly Repository</name>
+        <url>http://people.apache.org/repository/</url>
+        <layout>legacy</layout>
+      </repository>
+    </repositories>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.apache.tuscany</groupId>
+            <artifactId>spi</artifactId>
+            <version>${sca.version}</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-core</artifactId>
+            <version>3.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.apache.servicemix</groupId>
+            <artifactId>servicemix-common</artifactId>
+            <version>3.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+
+    </dependencies>
 
 </project>

Added: incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/JBIBinding.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/JBIBinding.java?rev=431329&view=auto
==============================================================================
--- incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/JBIBinding.java
(added)
+++ incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/JBIBinding.java
Mon Aug 14 05:30:16 2006
@@ -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.servicemix;
+
+import org.apache.tuscany.spi.model.Binding;
+
+/**
+ * Represents a JBI binding
+ */
+public class JBIBinding extends Binding {
+
+    private String uri;
+
+    private String port;
+
+    public String getPort() {
+        return port;
+    }
+
+    public void setPort(String port) {
+        this.port = port;
+    }
+
+    public String getURI() {
+        return uri;
+    }
+
+    public void setURI(String uri) {
+        this.uri = uri;
+    }
+}

Propchange: incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/JBIBinding.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/JBIBinding.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/JBIBindingLoader.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/JBIBindingLoader.java?rev=431329&view=auto
==============================================================================
--- incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/JBIBindingLoader.java
(added)
+++ incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/JBIBindingLoader.java
Mon Aug 14 05:30:16 2006
@@ -0,0 +1,63 @@
+/*
+ * 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.servicemix;
+
+import javax.xml.namespace.QName;
+import javax.xml.stream.XMLStreamException;
+import javax.xml.stream.XMLStreamReader;
+
+import org.apache.tuscany.spi.annotation.Autowire;
+import org.apache.tuscany.spi.component.CompositeComponent;
+import org.apache.tuscany.spi.deployer.DeploymentContext;
+import org.apache.tuscany.spi.extension.LoaderExtension;
+import org.apache.tuscany.spi.loader.LoaderException;
+import org.apache.tuscany.spi.loader.LoaderRegistry;
+import org.apache.tuscany.spi.loader.LoaderUtil;
+import org.osoa.sca.annotations.Scope;
+
+/**
+ * Loader for handling <binding.jbi> elements.
+ */
+@Scope("MODULE")
+public class JBIBindingLoader extends LoaderExtension<JBIBinding> {
+
+    public static final QName BINDING_JBI = new QName("http://tuscany.apache.org/xmlns/binding/rmi/1.0-SNAPSHOT",
"binding.jbi");
+
+    public JBIBindingLoader(@Autowire LoaderRegistry registry) {
+        super(registry);
+    }
+
+    public QName getXMLType() {
+        return BINDING_JBI;
+    }
+
+    public JBIBinding load(CompositeComponent parent, XMLStreamReader reader, DeploymentContext
deploymentContext) throws XMLStreamException,
+            LoaderException {
+
+        String port = reader.getAttributeValue(null, "port");
+        String uri = reader.getAttributeValue(null, "uri");
+        LoaderUtil.skipToEndElement(reader);
+
+        JBIBinding binding = new JBIBinding();
+        binding.setPort(port);
+        binding.setURI(uri);
+        
+        return binding;
+    }
+}

Propchange: incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/JBIBindingLoader.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/JBIBindingLoader.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixBuilder.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixBuilder.java?rev=431329&view=auto
==============================================================================
--- incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixBuilder.java
(added)
+++ incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixBuilder.java
Mon Aug 14 05:30:16 2006
@@ -0,0 +1,57 @@
+/*
+ * 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 pejbissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.servicemix;
+
+import org.apache.tuscany.spi.component.CompositeComponent;
+import org.apache.tuscany.spi.component.SCAObject;
+import org.apache.tuscany.spi.deployer.DeploymentContext;
+import org.apache.tuscany.spi.extension.BindingBuilderExtension;
+import org.apache.tuscany.spi.model.BoundReferenceDefinition;
+import org.apache.tuscany.spi.model.BoundServiceDefinition;
+
+/**
+ * Builds a Service or Reference for a JBI binding.
+ */
+public class ServiceMixBuilder extends BindingBuilderExtension<JBIBinding> {
+
+    protected Class<JBIBinding> getBindingType() {
+        return JBIBinding.class;
+    }
+
+    @SuppressWarnings( { "unchecked" })
+    public SCAObject build(CompositeComponent parent, BoundServiceDefinition<JBIBinding>
boundServiceDefinition, DeploymentContext deploymentContext) {
+
+        String name = boundServiceDefinition.getName();
+
+        ServiceMixService serviceMixService = new ServiceMixService(name, parent, wireService,
null);
+
+        return serviceMixService;
+    }
+
+    @SuppressWarnings( { "unchecked" })
+    public ServiceMixReference build(CompositeComponent parent, BoundReferenceDefinition<JBIBinding>
boundReferenceDefinition,
+            DeploymentContext deploymentContext) {
+
+        
+        ServiceMixReference serviceMixReference = new ServiceMixReference(null, parent, wireService,
null, null);
+        
+        return serviceMixReference;
+
+    }
+}

Propchange: incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixBuilder.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixBuilder.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixInvoker.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixInvoker.java?rev=431329&view=auto
==============================================================================
--- incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixInvoker.java
(added)
+++ incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixInvoker.java
Mon Aug 14 05:30:16 2006
@@ -0,0 +1,77 @@
+/*
+ * 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.servicemix;
+
+import java.lang.reflect.InvocationTargetException;
+
+import javax.jbi.messaging.DeliveryChannel;
+import javax.jbi.messaging.ExchangeStatus;
+import javax.jbi.messaging.InOut;
+import javax.jbi.messaging.MessagingException;
+import javax.jbi.messaging.NormalizedMessage;
+import javax.xml.namespace.QName;
+
+import org.apache.servicemix.jbi.jaxp.StringSource;
+import org.apache.servicemix.sca.ScaServiceUnit;
+import org.apache.tuscany.spi.extension.TargetInvokerExtension;
+
+/**
+ * Invoke a JBI reference.
+ */
+public class ServiceMixInvoker extends TargetInvokerExtension {
+
+    private QName serviceName;
+
+    private ScaServiceUnit serviceUnit;
+
+    public ServiceMixInvoker(QName serviceName) {
+        this.serviceName = serviceName;
+        this.serviceUnit = ScaServiceUnit.getCurrentScaServiceUnit();
+    }
+
+    public Object invokeTarget(Object payload) throws InvocationTargetException {
+        try {
+            DeliveryChannel channel = serviceUnit.getComponent().getComponentContext().getDeliveryChannel();
+
+            // TODO: in-only case ?
+            // TODO: interface based routing ?
+            // TODO: explicit endpoint selection ?
+
+            InOut inout = channel.createExchangeFactory().createInOutExchange();
+            inout.setService(serviceName);
+            NormalizedMessage in = inout.createMessage();
+            inout.setInMessage(in);
+            in.setContent(new StringSource(payload.toString()));
+
+            boolean sent = channel.sendSync(inout);
+            // TODO: check for error ?
+
+            NormalizedMessage out = inout.getOutMessage();
+            Object response = out.getContent();
+            inout.setStatus(ExchangeStatus.DONE);
+            channel.send(inout);
+
+            return response;
+
+        } catch (MessagingException e) {
+            throw new InvocationTargetException(e);
+        }
+    }
+
+}

Propchange: incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixInvoker.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixInvoker.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixReference.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixReference.java?rev=431329&view=auto
==============================================================================
--- incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixReference.java
(added)
+++ incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixReference.java
Mon Aug 14 05:30:16 2006
@@ -0,0 +1,54 @@
+/*
+ * 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.servicemix;
+
+import java.lang.reflect.Method;
+
+import javax.xml.namespace.QName;
+
+import org.apache.tuscany.spi.component.CompositeComponent;
+import org.apache.tuscany.spi.extension.ReferenceExtension;
+import org.apache.tuscany.spi.wire.TargetInvoker;
+import org.apache.tuscany.spi.wire.WireService;
+
+/**
+ * 
+ */
+public class ServiceMixReference<T> extends ReferenceExtension<T> {
+
+    private final String uri; 
+
+    public ServiceMixReference(String name, 
+                        CompositeComponent<?> parent, 
+                        WireService wireService, 
+                        String uri,
+                        Class<T> service) 
+    {
+        super(name, service, parent, wireService);
+        setInterface(service);
+        this.uri = uri;
+    }
+
+    public TargetInvoker createTargetInvoker(Method arg0) {
+        QName serviceName = null;
+        ServiceMixInvoker invoker = new ServiceMixInvoker(serviceName);
+        return invoker;
+    }
+
+}

Propchange: incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixReference.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixReference.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixService.java?rev=431329&view=auto
==============================================================================
--- incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixService.java
(added)
+++ incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixService.java
Mon Aug 14 05:30:16 2006
@@ -0,0 +1,42 @@
+/*
+ * 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.servicemix;
+
+import org.apache.tuscany.spi.component.CompositeComponent;
+import org.apache.tuscany.spi.extension.ServiceExtension;
+import org.apache.tuscany.spi.wire.WireService;
+
+/**
+ * 
+ */
+public class ServiceMixService<T> extends ServiceExtension<T> {
+
+    public ServiceMixService(String name, CompositeComponent parent, WireService wireService,
Class<T> service) {
+        super(name, service, parent, wireService);
+    }
+
+    public void start() {
+        super.start();
+    }
+
+    public void stop() {
+        super.stop();
+    }
+
+}

Propchange: incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixService.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/bindings/binding.servicemix/src/main/java/org/apache/tuscany/servicemix/ServiceMixService.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



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