You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by ad...@apache.org on 2008/05/03 22:52:58 UTC

svn commit: r653133 [22/33] - in /incubator/tuscany/sandbox/mobile-android: android-jdk-classes/ android-jdk-classes/src/ android-jdk-classes/src/javax/ android-jdk-classes/src/javax/xml/ android-jdk-classes/src/javax/xml/namespace/ android-jdk-classes...

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/EndpointReference.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/EndpointReference.java?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/EndpointReference.java (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/EndpointReference.java Sat May  3 13:52:41 2008
@@ -0,0 +1,93 @@
+/*
+ * 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.runtime;
+
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.Contract;
+import org.apache.tuscany.sca.interfacedef.InterfaceContract;
+
+/**
+ * The endpoint reference for a component service or reference
+ * 
+ * @version $Rev: 576055 $ $Date: 2007-09-16 00:11:45 -0700 (Sun, 16 Sep 2007) $
+ */
+public interface EndpointReference extends Cloneable {
+    /**
+     * Get the component for the endpoint
+     * @return The component, null of the EPR is for a non-SCA service
+     */
+    RuntimeComponent getComponent();
+
+    /**
+     * Get the component service or reference for the endpoint
+     * @return The component service or reference, null if the EPR is for a non-SCA service
+     */
+    Contract getContract();
+
+    /**
+     * Get the binding for the endpoint
+     * @return The binding
+     */
+    Binding getBinding();
+
+    /**
+     * Get the interface contract for the endpoint
+     * @return The interface contract
+     */
+    InterfaceContract getInterfaceContract();
+    
+    /**
+     * Update the interface contract for the endpoint
+     * @param interfaceContract The updated interface contract
+     */
+    void setInterfaceContract(InterfaceContract interfaceContract);
+
+    /**
+     * Get the URI for this endpoint
+     * @return The URI of the endpoint
+     */
+    String getURI();
+
+    /**
+     * Set the URI for this endpoint
+     * @param uri The new URI of the endpoint
+     */
+    void setURI(String uri);
+
+    /**
+     * Get the callback endpoint for this endpoint
+     * @return The callback endpoint for this endpoint
+     */
+    EndpointReference getCallbackEndpoint();
+
+    /**
+     * Set the callback endpoint for this endpoint
+     * @param callbackEndpoint The new callback endpoint for this endpoint
+     */
+    void setCallbackEndpoint(EndpointReference callbackEndpoint);
+
+    Object clone() throws CloneNotSupportedException;   
+    
+    void setReferenceParameters(ReferenceParameters parameters);
+    ReferenceParameters getReferenceParameters();
+
+    void mergeEndpoint(EndpointReference epr);
+    
+}

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/ReferenceParameters.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/ReferenceParameters.java?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/ReferenceParameters.java (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/ReferenceParameters.java Sat May  3 13:52:41 2008
@@ -0,0 +1,69 @@
+/*
+ * 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.runtime;
+
+/**
+ * Parameters for the EndPointReference
+ * 
+ * @version $Rev: 574648 $ $Date: 2007-09-11 10:45:36 -0700 (Tue, 11 Sep 2007) $
+ */
+public interface ReferenceParameters extends Cloneable {
+    /**
+     * Get the callback ID
+     * @return the callbackID
+     */
+    Object getCallbackID();
+
+    /**
+     * Set the callback ID
+     * @param callbackID the callbackID to set
+     */
+    void setCallbackID(Object callbackID);
+
+    /**
+     * Get the conversation ID
+     * @return the conversationID
+     */
+    Object getConversationID();
+
+    /**
+     * Set the conversation ID
+     * @param conversationID the conversationID to set
+     */
+    void setConversationID(Object conversationID);
+
+    /**
+     * Get the ID for the non-ServiceReference callback object
+     * @return
+     */
+    Object getCallbackObjectID();
+
+    /**
+     * Set the ID for the non-ServiceReference callback object
+     * @param callbackObjectID
+     */
+    void setCallbackObjectID(Object callbackObjectID);
+
+    EndpointReference getCallbackReference();
+
+    void setCallbackReference(EndpointReference callback);
+
+    Object clone() throws CloneNotSupportedException;
+}

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponent.java?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponent.java (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponent.java Sat May  3 13:52:41 2008
@@ -0,0 +1,83 @@
+/*
+ * 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.runtime;
+
+import java.util.List;
+
+import org.apache.tuscany.sca.assembly.Component;
+import org.apache.tuscany.sca.provider.ImplementationProvider;
+import org.apache.tuscany.sca.provider.PolicyProvider;
+
+/**
+ * The runtime component interface. Provides the bridge between the
+ * assembly model representation of a component and its runtime 
+ * realization.
+ * 
+ * @version $Rev: 639280 $ $Date: 2008-03-20 06:10:11 -0700 (Thu, 20 Mar 2008) $
+ */
+public interface RuntimeComponent extends Component {
+    /**
+     * Set the implementation-specific configuration for this component
+     * @param implementationProvider The object that manages the component implementation
+     */
+    void setImplementationProvider(ImplementationProvider implementationProvider);
+
+    /**
+     * Get the implementation-specific configuration for this component
+     * @return The implementation provider for this component
+     */
+    ImplementationProvider getImplementationProvider();
+
+    /**
+     * Get the associated component context
+     * @return
+     */
+    RuntimeComponentContext getComponentContext();
+
+    /**
+     * Set the associated component context
+     * @param context
+     */
+    void setComponentContext(RuntimeComponentContext context);
+
+    /**
+     * Tests if the RuntimeComponent is started
+     * @return true if the RuntimeComponent is started otherwise false
+     */
+    boolean isStarted();
+
+    /**
+     * Sets the RuntimeComponent started state
+     * @param the state to set
+     */
+    void setStarted(boolean started);
+    
+    /**
+     * Add a policy provider to the component
+     * @param policyProvider
+     */
+    void addPolicyProvider(PolicyProvider policyProvider);
+    
+    /**
+     * Get a list of policy providers configured for this component
+     * @return
+     */
+    List<PolicyProvider> getPolicyProviders();
+}

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentContext.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentContext.java?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentContext.java (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentContext.java Sat May  3 13:52:41 2008
@@ -0,0 +1,104 @@
+/*
+ * 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.runtime;
+
+import java.io.IOException;
+import java.io.Reader;
+import java.io.Writer;
+
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.ComponentService;
+import org.osoa.sca.CallableReference;
+import org.osoa.sca.ComponentContext;
+import org.osoa.sca.ServiceReference;
+
+/**
+ * @version $Rev: 639280 $ $Date: 2008-03-20 06:10:11 -0700 (Thu, 20 Mar 2008) $
+ */
+public interface RuntimeComponentContext extends ComponentContext {
+    /**
+     * Activate the reference (creating runtime wires)
+     * @param reference
+     */
+    void start(RuntimeComponentReference reference);
+
+    /**
+     * Deserialize the component reference
+     * @param reader
+     * @return A component that contains the reference
+     * @throws IOException
+     */
+    RuntimeComponent read(Reader reader) throws IOException;
+
+    /**
+     * Serialize the component reference
+     * @param reference
+     * @param writer
+     * @throws IOException
+     */
+    void write(RuntimeComponentReference reference, Writer writer) throws IOException;
+
+    /**
+     * Get the CallableReference for a given component reference
+     * @param <B>
+     * @param businessInterface The business interface
+     * @param reference The reference to be wired
+     * @param binding The binding to be used, if it's null, either binding.sca or the 1st binding
+     * will be selected
+     * @return A service reference representing the wire
+     */
+    <B> ServiceReference<B> getServiceReference(Class<B> businessInterface,
+                                                RuntimeComponentReference reference,
+                                                Binding binding);
+
+    /**
+     * Bind the reference to a target component/componentService
+     * @param <B>
+     * @param businessInterface The business interface
+     * @param reference The reference to be wired
+     * @param component The target component
+     * @param service The target component service
+     * @return A service reference representing the wire
+     */
+    <B> ServiceReference<B> getServiceReference(Class<B> businessInterface,
+                                                RuntimeComponentReference reference,
+                                                RuntimeComponent component,
+                                                RuntimeComponentService service);
+
+    /**
+     * Create a CallableReference for the given component service
+     * @param <B>
+     * @param businessInterface
+     * @param component
+     * @param service
+     * @return
+     */
+    <B> CallableReference<B> getCallableReference(Class<B> businessInterface,
+                                                  RuntimeComponent component,
+                                                  RuntimeComponentService service);
+
+    /**
+     * @param <B>
+     * @param businessInterface
+     * @param service
+     * @return
+     */
+    <B> ServiceReference<B> createSelfReference(Class<B> businessInterface, ComponentService service);
+}

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentReference.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentReference.java?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentReference.java (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentReference.java Sat May  3 13:52:41 2008
@@ -0,0 +1,99 @@
+/*
+ * 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.runtime;
+
+import java.util.List;
+
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.ComponentReference;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.provider.PolicyProvider;
+import org.apache.tuscany.sca.provider.ReferenceBindingProvider;
+
+/**
+ * The runtime component reference. Provides the bridge between the 
+ * assembly model representation of a component reference and its runtime 
+ * realization
+ * 
+ * @version $Rev: 639280 $ $Date: 2008-03-20 06:10:11 -0700 (Thu, 20 Mar 2008) $
+ */
+public interface RuntimeComponentReference extends ComponentReference {
+
+    /**
+     * Get a list of runtime wires to the reference
+     * 
+     * @return The list of wires
+     */
+    List<RuntimeWire> getRuntimeWires();
+    
+    /**
+     * Get the runtime wire for the given binding
+     * @param binding The assembly model binding 
+     * @return The runtime wire
+     */
+    RuntimeWire getRuntimeWire(Binding binding);
+
+    /**
+     * Returns the reference binding provider associated with this
+     * component reference and the given binding.
+     * 
+     * @param binding The assembly model binding 
+     * @return The runtime reference binding provider
+     */
+    ReferenceBindingProvider getBindingProvider(Binding binding);
+    
+    /**
+     * Sets the reference binding provider associated with this
+     * component reference and the given binding.
+     * 
+     * @param binding The assembly model binding 
+     * @param bindingProvider The runtime reference binding provider
+     */
+    void setBindingProvider(Binding binding, ReferenceBindingProvider bindingProvider);
+    
+    /**
+     * Add a policy provider for the given binding to the reference
+     * @param binding The assembly model binding
+     * @param policyProvider The policy handler
+     */
+    void addPolicyProvider(Binding binding, PolicyProvider policyProvider);
+    
+    /**
+     * Get a list of policy providers for the given binding
+     * @param binding The assembly model binding
+     * @return A list of policy providers for the given binding
+     */
+    List<PolicyProvider> getPolicyProviders(Binding binding);    
+    
+    /**
+     * Get the invoker for the given binding and operation
+     * @param binding The assembly model binding
+     * @param operation The assembly model operation
+     * @return The runtime Invoker
+     */
+    Invoker getInvoker(Binding binding, Operation operation); 
+    
+    /**
+     * Set the owning component
+     * @param component
+     */
+    void setComponent(RuntimeComponent component);
+}

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentService.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentService.java?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentService.java (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentService.java Sat May  3 13:52:41 2008
@@ -0,0 +1,138 @@
+/*
+ * 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.runtime;
+
+import java.util.List;
+
+import org.apache.tuscany.sca.assembly.Binding;
+import org.apache.tuscany.sca.assembly.ComponentService;
+import org.apache.tuscany.sca.interfacedef.InterfaceContract;
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.InvocationChain;
+import org.apache.tuscany.sca.invocation.Invoker;
+import org.apache.tuscany.sca.provider.PolicyProvider;
+import org.apache.tuscany.sca.provider.ServiceBindingProvider;
+
+/**
+ * The runtime component service. Provides the bridge between the 
+ * assembly model representation of a component service and its runtime 
+ * realization
+ * 
+ * @version $Rev: 639280 $ $Date: 2008-03-20 06:10:11 -0700 (Thu, 20 Mar 2008) $
+ */
+public interface RuntimeComponentService extends ComponentService {
+
+    /**
+     * Get a list of runtime wires to the service
+     * 
+     * @return The list of wires
+     */
+    List<RuntimeWire> getRuntimeWires();
+    /**
+     * Get the runtime wire for the given binding
+     * @param binding The assembly model binding 
+     * @return The runtime wire
+     */
+    RuntimeWire getRuntimeWire(Binding binding);
+    
+    /**
+     * Get the callback wires associated with this service
+     * 
+     * @return The list of runtime callback wires
+     */
+    List<RuntimeWire> getCallbackWires();
+
+    /**
+     * Returns the service binding provider associated with this
+     * component service and the given binding.
+     * 
+     * @param binding The assembly model binding 
+     * @return The runtime service binding provider
+     */
+    ServiceBindingProvider getBindingProvider(Binding binding);
+    
+    /**
+     * Returns the service binding provider associated with this
+     * component service and the given binding.
+     * 
+     * @param binding
+     * @param interfaceContract
+     * @return
+     */
+    RuntimeWire getRuntimeWire(Binding binding, InterfaceContract interfaceContract);
+    
+    /**
+     * Sets the service binding provider associated with this
+     * component service and the given binding.
+     *
+     * @param binding The assembly model binding 
+     * @param bindingProvider The runtime service binding provider
+     */
+    void setBindingProvider(Binding binding, ServiceBindingProvider bindingProvider);
+    
+    /**
+     * Get the invoker for the given binding and operation
+     * @param binding The assembly model binding 
+     * @param operation The assembly model operation
+     * @return The runtime invoker
+     */
+    Invoker getInvoker(Binding binding, Operation operation);    
+
+    /**
+     * Get the invoker for the given binding and operation
+     * @param binding The assembly model binding 
+     * @param interfaceContract the client interface contract
+     * @param operation The assembly model operation
+     * @return The runtime invoker
+     */
+    Invoker getInvoker(Binding binding, InterfaceContract interfaceContract, Operation operation);    
+    
+    /**
+     * Get the invocation chain for the given binding and operation
+     * @param binding The assembly model binding 
+     * @param operation The assembly model operation
+     * @return The runtime invocation chain
+     */
+    InvocationChain getInvocationChain(Binding binding, Operation operation);  
+    
+    /**
+     * Get the invocation chain for the given binding and operation
+     * @param binding The assembly model binding 
+     * @param operation The assembly model operation
+     * @param interfaceContract the client interface contract
+     * @return The runtime invocation chain
+     */
+    InvocationChain getInvocationChain(Binding binding, InterfaceContract interfaceContract, Operation operation);
+    
+    /**
+     * Add a policy provider for the given binding to the service
+     * @param binding The assembly model binding
+     * @param policyProvider The policy handler
+     */
+    void addPolicyProvider(Binding binding, PolicyProvider policyProvider);
+    
+    /**
+     * Get a list of policy providers for the given binding
+     * @param binding The assembly model binding
+     * @return A list of policy providers for the given binding
+     */
+    List<PolicyProvider> getPolicyProviders(Binding binding);
+
+}

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeWire.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeWire.java?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeWire.java (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeWire.java Sat May  3 13:52:41 2008
@@ -0,0 +1,101 @@
+/*
+ * 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.runtime;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.List;
+
+import org.apache.tuscany.sca.interfacedef.Operation;
+import org.apache.tuscany.sca.invocation.InvocationChain;
+import org.apache.tuscany.sca.invocation.Message;
+
+/**
+ * The runtime wire interface that connects a component reference to a 
+ *  component service (or an external service) over the selected binding
+ * 
+ * @version $Rev: 576055 $ $Date: 2007-09-16 00:11:45 -0700 (Sun, 16 Sep 2007) $
+ */
+public interface RuntimeWire extends Cloneable {
+
+    /**
+     * Get the source of the wire
+     * 
+     * @return The end point reference of the source
+     */
+    EndpointReference getSource();
+
+    /**
+     * Get the target of the wire
+     * 
+     * @return The end point reference of the target
+     */
+    EndpointReference getTarget();
+
+    /**
+     * Rebind the runtime wire with the given target
+     * @param target The target endpoint reference
+     */
+    void setTarget(EndpointReference target);
+    
+    /**
+     * Force the invocation chains to be rebuilt
+     */
+    void rebuild();
+
+    /**
+     * Returns the invocation chains for service operations associated with the
+     * wire
+     * 
+     * @return the invocation chains for service operations associated with the
+     *         wire
+     */
+    List<InvocationChain> getInvocationChains();
+    
+    /**
+     * Lookup the invocation chain by operation
+     * @param operation The operation
+     * @return The invocation chain for the given operation
+     */
+    InvocationChain getInvocationChain(Operation operation);
+    
+    /**
+     * Invoke an operation with given arguments
+     * @param operation The operation
+     * @param args The arguments
+     * @return The result
+     * @throws InvocationTargetException
+     */
+    Object invoke(Operation operation, Object[] args) throws InvocationTargetException;
+
+    /**
+     * Invoke an operation with a context message
+     * @param operation The operation
+     * @param msg The message
+     * @return The result
+     * @throws InvocationTargetException
+     */
+    Object invoke(Operation operation, Message msg) throws InvocationTargetException;
+
+    /**
+     * @return a clone of the runtime wire
+     * @throws CloneNotSupportedException
+     */
+    Object clone() throws CloneNotSupportedException;
+}

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeWireProcessor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeWireProcessor.java?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeWireProcessor.java (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeWireProcessor.java Sat May  3 13:52:41 2008
@@ -0,0 +1,35 @@
+/*
+ * 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.runtime;
+
+/**
+ * Implementations are called after wires are decorated with policy and before they are connected.
+ *
+ * @version $Rev: 538423 $ $Date: 2007-05-15 21:11:06 -0700 (Tue, 15 May 2007) $
+ */
+public interface RuntimeWireProcessor {
+
+    /**
+     * Process the runtime wire to add interceptors
+     * 
+     * @param wire
+     */
+    void process(RuntimeWire wire);
+
+}

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeWireProcessorExtensionPoint.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeWireProcessorExtensionPoint.java?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeWireProcessorExtensionPoint.java (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeWireProcessorExtensionPoint.java Sat May  3 13:52:41 2008
@@ -0,0 +1,53 @@
+/*
+ * 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.runtime;
+
+import java.util.List;
+
+/**
+ * Acts as a delegating <code>WireProcessorExtensionPoint</code>, delegating
+ * processing of wires after policies have been applied and source and targets
+ * have been connected.
+ * 
+ * @version $Rev: 539355 $ $Date: 2007-05-18 03:05:14 -0700 (Fri, 18 May 2007) $
+ */
+public interface RuntimeWireProcessorExtensionPoint {
+
+    /**
+     * Registers a wire-processor in the runtime
+     * 
+     * @param processor The processor to register
+     */
+    void addWireProcessor(RuntimeWireProcessor processor);
+
+    /**
+     * De-registers a wire-processor in the runtime
+     * 
+     * @param processor The processor to de-register
+     */
+    void removeWireProcessor(RuntimeWireProcessor processor);
+
+    /**
+     * Returns a list of registered wire-processors.
+     * 
+     * @return The list of wire processors
+     */
+    List<RuntimeWireProcessor> getWireProcessors();
+    
+}

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/DuplicateRecordException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/DuplicateRecordException.java?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/DuplicateRecordException.java (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/DuplicateRecordException.java Sat May  3 13:52:41 2008
@@ -0,0 +1,45 @@
+/*
+ * 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.store;
+
+/**
+ * thrown when a record already exists during an insert operation
+ *
+ * @version $Rev: 537206 $ $Date: 2007-05-11 08:14:19 -0700 (Fri, 11 May 2007) $
+ */
+public class DuplicateRecordException extends StoreWriteException {
+    private static final long serialVersionUID = 3116253222569378447L;
+
+    public DuplicateRecordException() {
+        super();
+    }
+
+    public DuplicateRecordException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public DuplicateRecordException(String message) {
+        super(message);
+    }
+
+    public DuplicateRecordException(Throwable cause) {
+        super(cause);
+    }
+
+}

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/RecoveryListener.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/RecoveryListener.java?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/RecoveryListener.java (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/RecoveryListener.java Sat May  3 13:52:41 2008
@@ -0,0 +1,46 @@
+/*
+ * 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.store;
+
+import java.util.UUID;
+
+/**
+ * Implementations receive callback events during a store recovery operation
+ *
+ * @version $Rev: 537206 $ $Date: 2007-05-11 08:14:19 -0700 (Fri, 11 May 2007) $
+ */
+public interface RecoveryListener {
+
+    /**
+     * Signals the start of a recovery
+     */
+    void onBegin();
+
+    /**
+     * Received when a record is recovered
+     *
+     * @param id
+     */
+    void onRecord(UUID id);
+
+    /**
+     * Signals the end of recovery
+     */
+    void onEnd();
+}

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/Store.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/Store.java?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/Store.java (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/Store.java Sat May  3 13:52:41 2008
@@ -0,0 +1,96 @@
+/*
+ * 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.store;
+
+import org.apache.tuscany.sca.event.EventPublisher;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+
+/**
+ * Implementations provide a persistent store for runtime data such as conversational state. A persistent store could be
+ * implemented in a durable fashion using JDBC or a journaling system, or using a non-durable mechanism such as an
+ * in-memory map.
+ *
+ * @version $Rev: 538423 $ $Date: 2007-05-15 21:11:06 -0700 (Tue, 15 May 2007) $
+ */
+public interface Store extends EventPublisher {
+
+    /* Used to indicate an the default expiration offset for records for the store */
+    long DEFAULT_EXPIRATION_OFFSET = -1;
+
+    /* Used to indicate an entry should not expire */
+    long NEVER = -2;
+
+    /**
+     * Adds the given record to the store. Implementations may choose different strategies for writing data such as
+     * write-through or write-behind.
+     *
+     * @param owner      the instance owner
+     * @param id         the unique id of the record
+     * @param object     the object representing the data to write
+     * @param expiration the time in milliseconds when the entry expires
+     * @throws StoreWriteException if an error occurs during the write operation
+     */
+    void insertRecord(RuntimeComponent owner, String id, Object object, long expiration) throws StoreWriteException;
+
+    /**
+     * Updates a given record in the store, overwriting previous information.
+     *
+     * @param owner      the instance owner
+     * @param id         the unique id of the record
+     * @param object     the object representing the data to write
+     * @param expiration the time in milliseconds when the entry expires
+     * @throws StoreWriteException
+     */
+    void updateRecord(RuntimeComponent owner, String id, Object object, long expiration) throws StoreWriteException;
+
+    /**
+     * Returns the deserialized object in the store corresponding to the given id
+     *
+     * @param owner the instance owner
+     * @param id    the unique id of the record
+     * @return the deserialized object or null if one is not found
+     * @throws StoreReadException
+     */
+    Object readRecord(RuntimeComponent owner, String id) throws StoreReadException;
+
+    /**
+     * Removes a record from the store
+     *
+     * @param owner the instance owner
+     * @param id    the unique id of the record
+     * @throws StoreWriteException
+     */
+    void removeRecord(RuntimeComponent owner, String id) throws StoreWriteException;
+
+    /**
+     * Removes all records from the store
+     *
+     * @throws StoreWriteException
+     */
+    void removeRecords() throws StoreWriteException;
+
+    /**
+     * Initiates a recovery operation, for example during restart after a crash
+     *
+     * @param listener the listener to receive recovery callback events
+     * @throws StoreReadException
+     */
+    void recover(RecoveryListener listener) throws StoreReadException;
+
+}

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/StoreException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/StoreException.java?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/StoreException.java (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/StoreException.java Sat May  3 13:52:41 2008
@@ -0,0 +1,46 @@
+/*
+ * 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.store;
+
+
+/**
+ * Represents a generic exception thrown by a <code>Store</code>
+ *
+ * @version $Rev: 537206 $ $Date: 2007-05-11 08:14:19 -0700 (Fri, 11 May 2007) $
+ */
+public class StoreException extends Exception {
+    private static final long serialVersionUID = -319152147419962709L;
+
+    public StoreException() {
+        super();
+    }
+
+    public StoreException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public StoreException(String message) {
+        super(message);
+    }
+
+    public StoreException(Throwable cause) {
+        super(cause);
+    }
+    
+}

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/StoreExpirationEvent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/StoreExpirationEvent.java?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/StoreExpirationEvent.java (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/StoreExpirationEvent.java Sat May  3 13:52:41 2008
@@ -0,0 +1,71 @@
+/*
+ * 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.store;
+
+import org.apache.tuscany.sca.event.Event;
+import org.apache.tuscany.sca.runtime.RuntimeComponent;
+
+/**
+ * Fired when a store implementation expires a resource
+ *
+ * @version $Rev: 538423 $ $Date: 2007-05-15 21:11:06 -0700 (Tue, 15 May 2007) $
+ */
+public class StoreExpirationEvent implements Event {
+    private Object source;
+    private RuntimeComponent owner;
+    private Object instance;
+
+    /**
+     * Constructor.
+     *
+     * @param source   the source of the event
+     * @param owner    the owner of the expiring object
+     * @param instance the expiring object
+     */
+    public StoreExpirationEvent(Object source, RuntimeComponent owner, Object instance) {
+        assert source != null;
+        assert owner != null;
+        assert instance != null;
+        this.source = source;
+        this.owner = owner;
+        this.instance = instance;
+    }
+
+    public Object getSource() {
+        return source;
+    }
+
+    /**
+     * Returns the owner of the expiring object.
+     *
+     * @return the owner of the expiring object.
+     */
+    public RuntimeComponent getOwner() {
+        return owner;
+    }
+
+    /**
+     * Returns the expiring object.
+     *
+     * @return the expiring object.
+     */
+    public Object getInstance() {
+        return instance;
+    }
+}

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/StoreMonitor.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/StoreMonitor.java?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/StoreMonitor.java (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/StoreMonitor.java Sat May  3 13:52:41 2008
@@ -0,0 +1,71 @@
+/*
+ * 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.store;
+
+
+/**
+ * A generic monitor interface for services to log events
+ * 
+ * @version $Rev: 639280 $ $Date: 2008-03-20 06:10:11 -0700 (Thu, 20 Mar 2008) $
+ */
+public interface StoreMonitor {
+
+    /**
+     * Signals the service has started
+     * 
+     * @param msg
+     */
+    void start(String msg);
+
+    /**
+     * Signals the service has been shutdown
+     * 
+     * @param msg
+     */
+    void stop(String msg);
+
+    /**
+     * Fired when recovery is started
+     */
+
+    void beginRecover();
+
+    /**
+     * Fired when recovery is completed
+     */
+
+    void endRecover();
+
+    /**
+     * Fired when a record is processed during recovery
+     * 
+     * @param recordId the id of the record being recovered
+     */
+
+    void recover(Object recordId);
+
+    /**
+     * Signals an error event
+     * 
+     * @param e the error
+     */
+
+    void error(Throwable e);
+
+}

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/StoreReadException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/StoreReadException.java?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/StoreReadException.java (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/StoreReadException.java Sat May  3 13:52:41 2008
@@ -0,0 +1,45 @@
+/*
+ * 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.store;
+
+/**
+ * Thrown when an error occurs reading from persistent storage
+ *
+ * @version $Rev: 537206 $ $Date: 2007-05-11 08:14:19 -0700 (Fri, 11 May 2007) $
+ */
+public class StoreReadException extends StoreException {
+    private static final long serialVersionUID = -8624542082121467271L;
+
+    public StoreReadException() {
+        super();
+    }
+
+    public StoreReadException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public StoreReadException(String message) {
+        super(message);
+    }
+
+    public StoreReadException(Throwable cause) {
+        super(cause);
+    }
+    
+}

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/StoreWriteException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/StoreWriteException.java?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/StoreWriteException.java (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/store/StoreWriteException.java Sat May  3 13:52:41 2008
@@ -0,0 +1,45 @@
+/*
+ * 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.store;
+
+/**
+ * Thrown when an error occurs writing to persistent storage
+ *
+ * @version $Rev: 537206 $ $Date: 2007-05-11 08:14:19 -0700 (Fri, 11 May 2007) $
+ */
+public class StoreWriteException extends StoreException {
+    private static final long serialVersionUID = 5539070473942048555L;
+
+    public StoreWriteException() {
+        super();
+    }
+
+    public StoreWriteException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public StoreWriteException(String message) {
+        super(message);
+    }
+
+    public StoreWriteException(Throwable cause) {
+        super(cause);
+    }
+
+}

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/work/NotificationListener.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/work/NotificationListener.java?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/work/NotificationListener.java (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/work/NotificationListener.java Sat May  3 13:52:41 2008
@@ -0,0 +1,66 @@
+/*
+ * 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.work;
+
+/**
+ * A callback interface that can be optionally used for registering 
+ * interest in status of asynchronously scheduled unit of work.
+ *
+ */
+public interface NotificationListener<T extends Runnable> {
+    
+    /**
+     * Callback method when the unit of work is accepted.
+     * 
+     * @param work Work that was accepted.
+     */
+    void workAccepted(T work);
+    
+    /**
+     * Callback method when the unit of work is successfully completed.
+     * 
+     * @param work Work that was successfully completed.
+     */
+    void workCompleted(T work);
+    
+    /**
+     * Callback when the unit of work is started.
+     * 
+     * @param work Unit of work that was started.
+     */
+    void workStarted(T work);
+    
+    /**
+     * Callback when the unit of work is rejected.
+     * 
+     * @param work Unit of work that was rejected.
+     */
+    void workRejected(T work);
+    
+    /**
+     * Callback when the unit of work fails to complete.
+     * 
+     * @param work Unit of work that failed to complete.
+     * @param error Error that caused the unit of work to fail.
+     */
+    void workFailed(T work, Throwable error);
+    
+    
+
+}

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/work/WorkScheduler.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/work/WorkScheduler.java?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/work/WorkScheduler.java (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/work/WorkScheduler.java Sat May  3 13:52:41 2008
@@ -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 permissions and limitations
+ * under the License.    
+ */
+package org.apache.tuscany.sca.work;
+
+/**
+ * Defines the contract for scheduling asynchronous units of work.
+ * 
+ * <p>
+ * Units of work can be scheduled with an optional <code>NotificationListener</code>.
+ * If a notification listener is specified, the caller will be notified regarding the 
+ * status of the work. The unit of work can either be completed, rejected or completed 
+ * with an error. If the work completed with an error, the caller is notified with the 
+ * error details.
+ * </p>
+ *
+ */
+public interface WorkScheduler {
+    
+    /**
+     * Schedules a unit of work for future execution. The notification listener 
+     * is used to register interest in callbacks regarding the status of the work.
+     * 
+     * @param work The unit of work that needs to be asynchronously executed.
+     * @param listener Notification listener for callbacks.
+     */
+    <T extends Runnable>void scheduleWork(T work, NotificationListener<T> listener);
+    
+    /**
+     * Schedules a unit of work for future execution. The notification listener 
+     * is used to register interest in callbacks regarding the status of the work.
+     * 
+     * @param work The unit of work that needs to be asynchronously executed.
+     */
+    <T extends Runnable>void scheduleWork(T work);
+
+    /**
+     * Destroys the work scheduler
+     */
+    void destroy();
+
+}

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/work/WorkSchedulerException.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/work/WorkSchedulerException.java?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/work/WorkSchedulerException.java (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/java/org/apache/tuscany/sca/work/WorkSchedulerException.java Sat May  3 13:52:41 2008
@@ -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.work;
+
+
+/**
+ * Exception thrown by the work scheduler in case of unexpected exceptions.
+ * 
+ * @version $Rev: 567542 $ $Date: 2007-08-19 22:13:29 -0700 (Sun, 19 Aug 2007) $
+ *
+ */
+public class WorkSchedulerException extends RuntimeException {
+    private static final long serialVersionUID = 1L;
+
+    public WorkSchedulerException() {
+        super();
+    }
+
+    public WorkSchedulerException(String message, Throwable cause) {
+        super(message, cause);
+    }
+
+    public WorkSchedulerException(String message) {
+        super(message);
+    }
+
+    public WorkSchedulerException(Throwable cause) {
+        super(cause);
+    }
+
+}

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint Sat May  3 13:52:41 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.
+
+org.apache.tuscany.sca.provider.DefaultProviderFactoryExtensionPoint

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProviderExtensionPoint
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProviderExtensionPoint?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProviderExtensionPoint (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProviderExtensionPoint Sat May  3 13:52:41 2008
@@ -0,0 +1,19 @@
+# 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.provider.DefaultSCADefinitionsProviderExtensionPoint
+										
\ No newline at end of file

Added: incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.RuntimeWireProcessorExtensionPoint
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.RuntimeWireProcessorExtensionPoint?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.RuntimeWireProcessorExtensionPoint (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.RuntimeWireProcessorExtensionPoint Sat May  3 13:52:41 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.
+
+org.apache.tuscany.sca.runtime.DefaultWireProcessorExtensionPoint

Added: incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/.classpath
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/.classpath?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/.classpath (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/.classpath Sat May  3 13:52:41 2008
@@ -0,0 +1,32 @@
+<classpath>
+  <classpathentry kind="src" path="src/main/java"/>
+  <classpathentry kind="src" path="src/main/resources" excluding="**/*.java"/>
+  <classpathentry kind="src" path="src/test/java" output="target/test-classes"/>
+  <classpathentry kind="output" path="target/classes"/>
+  <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+  <classpathentry kind="var" path="M2_REPO/junit/junit/4.2/junit-4.2.jar"/>
+  <classpathentry kind="src" path="/tuscany-core-spi"/>
+  <classpathentry kind="src" path="/tuscany-extensibility"/>
+  <classpathentry kind="src" path="/tuscany-sca-api"/>
+  <classpathentry kind="src" path="/tuscany-assembly"/>
+  <classpathentry kind="src" path="/tuscany-policy"/>
+  <classpathentry kind="src" path="/tuscany-interface"/>
+  <classpathentry kind="src" path="/tuscany-definitions"/>
+  <classpathentry kind="src" path="/tuscany-contribution"/>
+  <classpathentry kind="var" path="M2_REPO/stax/stax-api/1.0.1/stax-api-1.0.1.jar"/>
+  <classpathentry kind="var" path="M2_REPO/xml-apis/xml-apis/1.3.03/xml-apis-1.3.03.jar"/>
+  <classpathentry kind="var" path="M2_REPO/org/codehaus/woodstox/wstx-asl/3.2.1/wstx-asl-3.2.1.jar"/>
+  <classpathentry kind="src" path="/tuscany-databinding"/>
+  <classpathentry kind="src" path="/tuscany-core"/>
+  <classpathentry kind="src" path="/tuscany-contribution-java"/>
+  <classpathentry kind="src" path="/tuscany-interface-java"/>
+  <classpathentry kind="var" path="M2_REPO/org/apache/geronimo/specs/geronimo-commonj_1.1_spec/1.0/geronimo-commonj_1.1_spec-1.0.jar"/>
+  <classpathentry kind="var" path="M2_REPO/cglib/cglib-nodep/2.1_3/cglib-nodep-2.1_3.jar"/>
+  <classpathentry kind="src" path="/tuscany-implementation-java"/>
+  <classpathentry kind="src" path="/tuscany-implementation-java-xml"/>
+  <classpathentry kind="src" path="/tuscany-assembly-xml"/>
+  <classpathentry kind="src" path="/tuscany-contribution-namespace"/>
+  <classpathentry kind="var" path="M2_REPO/xalan/xalan/2.7.0/xalan-2.7.0.jar"/>
+  <classpathentry kind="src" path="/tuscany-interface-java-xml"/>
+  <classpathentry kind="var" path="M2_REPO/org/easymock/easymock/2.2/easymock-2.2.jar"/>
+</classpath>
\ No newline at end of file

Added: incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/.project
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/.project?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/.project (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/.project Sat May  3 13:52:41 2008
@@ -0,0 +1,31 @@
+<projectDescription>
+  <name>tuscany-implementation-java-runtime</name>
+  <comment>Parent POM defining settings that can be used across Tuscany</comment>
+  <projects>
+    <project>tuscany-core-spi</project>
+    <project>tuscany-extensibility</project>
+    <project>tuscany-sca-api</project>
+    <project>tuscany-assembly</project>
+    <project>tuscany-policy</project>
+    <project>tuscany-interface</project>
+    <project>tuscany-definitions</project>
+    <project>tuscany-contribution</project>
+    <project>tuscany-databinding</project>
+    <project>tuscany-core</project>
+    <project>tuscany-contribution-java</project>
+    <project>tuscany-interface-java</project>
+    <project>tuscany-implementation-java</project>
+    <project>tuscany-implementation-java-xml</project>
+    <project>tuscany-assembly-xml</project>
+    <project>tuscany-contribution-namespace</project>
+    <project>tuscany-interface-java-xml</project>
+  </projects>
+  <buildSpec>
+    <buildCommand>
+      <name>org.eclipse.jdt.core.javabuilder</name>
+    </buildCommand>
+  </buildSpec>
+  <natures>
+    <nature>org.eclipse.jdt.core.javanature</nature>
+  </natures>
+</projectDescription>
\ No newline at end of file

Added: incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/.settings/org.eclipse.jdt.core.prefs?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/.settings/org.eclipse.jdt.core.prefs (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/.settings/org.eclipse.jdt.core.prefs Sat May  3 13:52:41 2008
@@ -0,0 +1,5 @@
+#Thu Mar 20 19:21:26 PDT 2008
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5

Added: incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/DISCLAIMER
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/DISCLAIMER?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/DISCLAIMER (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/DISCLAIMER Sat May  3 13:52:41 2008
@@ -0,0 +1,8 @@
+Apache Tuscany is an effort undergoing incubation at The Apache Software
+Foundation (ASF), sponsored by the Apache Web Services PMC. Incubation is
+required of all newly accepted projects until a further review indicates that
+the infrastructure, communications, and decision making process have stabilized
+in a manner consistent with other successful ASF projects. While incubation
+status is not necessarily a reflection of the completeness or stability of the
+code, it does indicate that the project has yet to be fully endorsed by the ASF.
+

Added: incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/LICENSE
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/LICENSE?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/LICENSE (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/LICENSE Sat May  3 13:52:41 2008
@@ -0,0 +1,205 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed 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.
+
+
+

Added: incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/NOTICE
URL: http://svn.apache.org/viewvc/incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/NOTICE?rev=653133&view=auto
==============================================================================
--- incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/NOTICE (added)
+++ incubator/tuscany/sandbox/mobile-android/tuscany-implementation-java-runtime/NOTICE Sat May  3 13:52:41 2008
@@ -0,0 +1,6 @@
+${pom.name}
+Copyright (c) 2005 - 2008 The Apache Software Foundation
+
+This product includes software developed by
+The Apache Software Foundation (http://www.apache.org/).
+