diff options
author | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-11 23:06:30 +0000 |
---|---|---|
committer | lresende <lresende@13f79535-47bb-0310-9956-ffa450edef68> | 2009-11-11 23:06:30 +0000 |
commit | 587877fcbd358e233f653e01c4b3ed3354203626 (patch) | |
tree | 0a05797eb4efa50b4118314b9b409bbdbc0584a8 /branches/sca-android-r643746/modules/core-spi/src/main | |
parent | 5e520b1b65c79cd828057cb628b9367acb266880 (diff) |
Moving 1.x branches
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@835118 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-android-r643746/modules/core-spi/src/main')
57 files changed, 0 insertions, 3636 deletions
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/ComponentContextFactory.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/ComponentContextFactory.java deleted file mode 100644 index 93fc219903..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/ComponentContextFactory.java +++ /dev/null @@ -1,38 +0,0 @@ -/*
- * 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.context;
-
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-import org.osoa.sca.ComponentContext;
-
-/**
- * Interface implemented by the provider of the ComponentContext.
- *
- * @version $Rev: 557408 $ $Date: 2007-07-18 14:58:03 -0700 (Wed, 18 Jul 2007) $
- */
-public interface ComponentContextFactory {
- /**
- * Create an instance of ComponentContext
- *
- * @param component The runtime component
- * @param requestContextFactory The factory to create RequestContext
- * @return An instance of ComponentContext for the component
- */
- ComponentContext createComponentContext(RuntimeComponent component, RequestContextFactory requestContextFactory);
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/ContextFactoryExtensionPoint.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/ContextFactoryExtensionPoint.java deleted file mode 100644 index 822c9ccd84..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/ContextFactoryExtensionPoint.java +++ /dev/null @@ -1,50 +0,0 @@ -/*
- * 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.context;
-
-/**
- * An extension point for context factories.
- *
- * @version $Rev: 572488 $ $Date: 2007-09-03 18:41:17 -0700 (Mon, 03 Sep 2007) $
- */
-public interface ContextFactoryExtensionPoint {
-
- /**
- * Add a context factory extension.
- *
- * @param factory The factory to add
- */
- void addFactory(Object factory);
-
- /**
- * Remove a context factory extension.
- *
- * @param factory The factory to remove
- */
- void removeFactory(Object factory);
-
- /**
- * Get a factory implementing the given interface.
- * @param factoryInterface the lookup key (factory interface)
- * @return The factory
- */
- <T> T getFactory(Class<T> factoryInterface);
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/DefaultContextFactoryExtensionPoint.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/DefaultContextFactoryExtensionPoint.java deleted file mode 100644 index 8cd0978ff0..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/DefaultContextFactoryExtensionPoint.java +++ /dev/null @@ -1,67 +0,0 @@ -/*
- * 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.context;
-
-import java.util.HashMap;
-
-/**
- * Default implementation of a model factory extension point.
- *
- * @version $Rev: 557408 $ $Date: 2007-07-18 14:58:03 -0700 (Wed, 18 Jul 2007) $
- */
-public class DefaultContextFactoryExtensionPoint implements ContextFactoryExtensionPoint {
-
- private HashMap<Class<?>, Object> factories = new HashMap<Class<?>, Object>();
-
- /**
- * Add a model factory extension.
- *
- * @param factory The factory to add
- */
- public void addFactory(Object factory) {
- Class[] interfaces = factory.getClass().getInterfaces();
- for (int i = 0; i<interfaces.length; i++) {
- factories.put(interfaces[i], factory);
- }
- }
-
- /**
- * Remove a model factory extension.
- *
- * @param factory The factory to remove
- */
- public void removeFactory(Object factory) {
- Class[] interfaces = factory.getClass().getInterfaces();
- for (int i = 0; i<interfaces.length; i++) {
- factories.remove(interfaces[i]);
- }
- }
-
- /**
- * Get a factory implementing the given interface.
- * @param factoryInterface The lookup key (factory interface)
- * @return The factory
- */
- public <T> T getFactory(Class<T> factoryInterface) {
- Object factory = factories.get(factoryInterface);
- return factoryInterface.cast(factory);
- }
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/PropertyValueFactory.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/PropertyValueFactory.java deleted file mode 100644 index fc8119578c..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/PropertyValueFactory.java +++ /dev/null @@ -1,38 +0,0 @@ -/*
- * 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.context;
-
-import org.apache.tuscany.sca.assembly.ComponentProperty;
-
-/**
- * Interface implemented by the provider of the property values
- */
-public interface PropertyValueFactory {
-
- /**
- * This method will create an instance of the value for the specified Property.
- *
- * @param property The Property from which to retrieve the property value
- * @param type The type of the property value being retrieved from the Property
- * @param <B> Type type of the property value being looked up
- *
- * @return the value for the Property
- */
- <B> B createPropertyValue(ComponentProperty property, Class<B> type);
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/RequestContextFactory.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/RequestContextFactory.java deleted file mode 100644 index 5435255708..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/RequestContextFactory.java +++ /dev/null @@ -1,33 +0,0 @@ -/*
- * 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.context;
-
-import org.osoa.sca.RequestContext;
-
-/**
- * Interface implemented by the provider of the RequestContext.
- *
- * @version $Rev: 557408 $ $Date: 2007-07-18 14:58:03 -0700 (Wed, 18 Jul 2007) $
- */
-public interface RequestContextFactory {
- /**
- * @return An instance of RequestContext for the current invocation
- */
- RequestContext createRequestContext();
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/core/DefaultExtensionPointRegistry.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/core/DefaultExtensionPointRegistry.java deleted file mode 100644 index efc2f80dc7..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/core/DefaultExtensionPointRegistry.java +++ /dev/null @@ -1,171 +0,0 @@ -/*
- * 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.core;
-
-import java.io.IOException;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Modifier;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint;
-import org.apache.tuscany.sca.extensibility.ServiceDiscovery;
-
-/**
- * Default implementation of a registry to hold all the Tuscany core extension
- * points. As the point of contact for all extension artifacts this registry
- * allows loaded extensions to find all other parts of the system and register
- * themselves appropriately.
- *
- * @version $Rev: 639350 $ $Date: 2008-03-20 09:43:46 -0700 (Thu, 20 Mar 2008) $
- */
-public class DefaultExtensionPointRegistry implements ExtensionPointRegistry {
- private Map<Class<?>, Object> extensionPoints = new HashMap<Class<?>, Object>();
-
- /**
- * Add an extension point to the registry. This default implementation
- * stores extensions against the interfaces that they implement.
- *
- * @param extensionPoint The instance of the extension point
- */
- public void addExtensionPoint(Object extensionPoint) {
- Set<Class> interfaces = getAllInterfaces(extensionPoint.getClass());
- for (Class i : interfaces) {
- extensionPoints.put(i, extensionPoint);
- }
- }
-
- private Constructor<?> getConstructor(Constructor<?>[] constructors, Class<?>[] paramTypes) {
- for (Constructor<?> c : constructors) {
- Class<?> types[] = c.getParameterTypes();
- if (c.getParameterTypes().length == paramTypes.length) {
- boolean found = true;
- for (int i = 0; i < types.length; i++) {
- if (types[i] != paramTypes[i]) {
- found = false;
- break;
- }
- }
- if (found) {
- return c;
- }
- }
- }
- return null;
- }
-
- /**
- * Get the extension point by the interface that it implements
- *
- * @param extensionPointType The lookup key (extension point interface)
- * @return The instance of the extension point
- */
- public <T> T getExtensionPoint(Class<T> extensionPointType) {
- Object extensionPoint = extensionPoints.get(extensionPointType);
- if (extensionPoint == null) {
-
- // Dynamically load an extension point class declared under META-INF/services
- try {
- Class<?> extensionPointClass =
- ServiceDiscovery.getInstance().loadFirstServiceClass(extensionPointType);
- if (extensionPointClass != null) {
- // Construct the extension point
- Constructor<?>[] constructors = extensionPointClass.getConstructors();
- Constructor constructor =
- getConstructor(constructors, new Class<?>[] {ModelFactoryExtensionPoint.class});
- if (constructor != null) {
- extensionPoint = constructor.newInstance(getExtensionPoint(ModelFactoryExtensionPoint.class));
- } else {
- constructor = getConstructor(constructors, new Class<?>[] {ExtensionPointRegistry.class});
- if (constructor != null) {
- extensionPoint = constructor.newInstance(this);
- } else {
- constructor = getConstructor(constructors, new Class<?>[] {});
- if (constructor != null) {
- extensionPoint = constructor.newInstance();
- } else {
- throw new IllegalArgumentException(
- "No valid constructor is found for " + extensionPointClass);
- }
- }
- }
-
- // Cache the loaded extension point
- addExtensionPoint(extensionPoint);
- }
- } catch (InvocationTargetException e) {
- throw new IllegalArgumentException(e);
- } catch (IOException e) {
- throw new IllegalArgumentException(e);
- } catch (ClassNotFoundException e) {
- throw new IllegalArgumentException(e);
- } catch (InstantiationException e) {
- throw new IllegalArgumentException(e);
- } catch (IllegalAccessException e) {
- throw new IllegalArgumentException(e);
- }
- }
- return extensionPointType.cast(extensionPoint);
- }
-
- /**
- * Remove an extension point based on the interface that it implements
- *
- * @param extensionPoint The extension point to remove
- */
- public void removeExtensionPoint(Object extensionPoint) {
- Set<Class> interfaces = getAllInterfaces(extensionPoint.getClass());
- for (Class i : interfaces) {
- extensionPoints.remove(i);
- }
- }
-
- /**
- * Returns the set of interfaces implemented by the given class and its
- * ancestors or a blank set if none
- */
- private static Set<Class> getAllInterfaces(Class clazz) {
- Set<Class> implemented = new HashSet<Class>();
- getAllInterfaces(clazz, implemented);
- return implemented;
- }
-
- private static void getAllInterfaces(Class clazz, Set<Class> implemented) {
- Class[] interfaces = clazz.getInterfaces();
- for (Class interfaze : interfaces) {
-// String name = interfaze.getName();
-// if (name.startsWith("java.") || name.startsWith("javax.")) {
-// continue;
-// }
- if (Modifier.isPublic(interfaze.getModifiers())) {
- implemented.add(interfaze);
- }
- }
- Class<?> superClass = clazz.getSuperclass();
- // Object has no superclass so check for null
- if (superClass != null && !superClass.equals(Object.class)) {
- getAllInterfaces(superClass, implemented);
- }
- }
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/core/ExtensionPointRegistry.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/core/ExtensionPointRegistry.java deleted file mode 100644 index 537c9d69d8..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/core/ExtensionPointRegistry.java +++ /dev/null @@ -1,50 +0,0 @@ -/*
- * 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.core;
-
-
-/**
- * The registry for the Tuscany core extension points. As the point of contact
- * for all extension artifacts this registry allows loaded extensions to find
- * all other parts of the system and register themselves appropriately.
- *
- * @version $Rev: 539355 $ $Date: 2007-05-18 03:05:14 -0700 (Fri, 18 May 2007) $
- */
-public interface ExtensionPointRegistry {
-
- /**
- * Add an extension point to the registry
- * @param extensionPoint The instance of the extension point
- */
- void addExtensionPoint(Object extensionPoint);
-
- /**
- * Get the extension point by the interface
- * @param extensionPointType The lookup key (extension point interface)
- * @return The instance of the extension point
- */
- <T> T getExtensionPoint(Class<T> extensionPointType);
-
- /**
- * Remove an extension point
- * @param extensionPoint The extension point to remove
- */
- void removeExtensionPoint(Object extensionPoint);
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/core/ModuleActivator.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/core/ModuleActivator.java deleted file mode 100644 index 1893dc57cc..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/core/ModuleActivator.java +++ /dev/null @@ -1,60 +0,0 @@ -/*
- * 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.core;
-
-
-/**
- * ModuleActivator represents a module that plugs into the Tuscany system. Each
- * module should provide an implementation of this interface and register the
- * ModuleActivator implementation class by defining a file named
- *
- * "META-INF/services/org.apache.tuscany.core.ModuleActivator"
- *
- * The content of the file is the class name of the ModuleActivator implementation.
- * The implementation class must have a no-arg constructor. The same instance
- * will be used to invoke all the methods during different phases of the module
- * activation. Note that the start and stop methods defined by this interface
- * take a reference to the Tuscany SCA runtime ExtensionPointRegistry. This
- * gives the ModuleActivator the opportunity to add extension points to the
- * registry as it is requested to start up and remove them when it is requested
- * to shut down.
- *
- * @version $Rev: 639280 $ $Date: 2008-03-20 06:10:11 -0700 (Thu, 20 Mar 2008) $
- */
-public interface ModuleActivator {
-
- /**
- * This method is invoked when the module is started by the Tuscany system.
- * It can be used by this module to register extensions against extension
- * points.
- *
- * @param registry The extension point registry
- */
- void start(ExtensionPointRegistry registry);
-
- /**
- * This method is invoked when the module is stopped by the Tuscany system.
- * It can be used by this module to unregister extensions against the
- * extension points.
- *
- * @param registry The extension point registry
- */
- void stop(ExtensionPointRegistry registry);
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/event/Event.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/event/Event.java deleted file mode 100644 index 0aa922afa0..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/event/Event.java +++ /dev/null @@ -1,33 +0,0 @@ -/*
- * 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.event;
-
-/**
- * The base interface for events that are propagated in the runtime
- *
- * @version $$Rev: 539355 $$ $$Date: 2007-05-18 03:05:14 -0700 (Fri, 18 May 2007) $$
- */
-public interface Event {
-
- /**
- * Returns the source of the event
- */
- Object getSource();
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/event/EventFilter.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/event/EventFilter.java deleted file mode 100644 index 00f6961235..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/event/EventFilter.java +++ /dev/null @@ -1,35 +0,0 @@ -/*
- * 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.event;
-
-/**
- * Evaluates whether a {@link RuntimeEventListener} is applicable to a given runtime event
- *
- * @version $$Rev: 539355 $$ $$Date: 2007-05-18 03:05:14 -0700 (Fri, 18 May 2007) $$
- */
-public interface EventFilter {
-
- /**
- * Performs the actual evaluation on an event
- * @param event Returns true if the event matches implemented criteria
- * @return Match result
- */
- boolean match(Event event);
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/event/EventPublisher.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/event/EventPublisher.java deleted file mode 100644 index 4a204efdd1..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/event/EventPublisher.java +++ /dev/null @@ -1,55 +0,0 @@ -/*
- * 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.event;
-
-/**
- * Publishes events in the runtime by accepting {@link Event} objects and
- * forwarding them to all registered {@link RuntimeEventListener} objects.
- *
- * @version $$Rev: 639280 $$ $$Date: 2008-03-20 06:10:11 -0700 (Thu, 20 Mar 2008) $$
- */
-public interface EventPublisher {
-
- /**
- * Publish an event to all registered listeners
- * @param object The event to publish
- */
- void publish(Event object);
-
- /**
- * Registers a listener to receive notifications for the context
- * @param listener The listener to add
- */
- void addListener(RuntimeEventListener listener);
-
- /**
- * Registers a listener to receive notifications for the context
- * @param filter The filter that will be applied before the lister is called
- * @param listener The lister to add
- */
- void addListener(EventFilter filter, RuntimeEventListener listener);
-
-
- /**
- * Removes a previously registered listener
- * @param listener The listener to remove
- */
- void removeListener(RuntimeEventListener listener);
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/event/RuntimeEventListener.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/event/RuntimeEventListener.java deleted file mode 100644 index e540ef683e..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/event/RuntimeEventListener.java +++ /dev/null @@ -1,35 +0,0 @@ -/*
- * 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.event;
-
-import java.util.EventListener;
-
-/**
- * Listeners observe events fired in the SCA runtime.
- *
- * @version $Rev: 539355 $ $Date: 2007-05-18 03:05:14 -0700 (Fri, 18 May 2007) $
- */
-public interface RuntimeEventListener extends EventListener {
-
- /**
- * Accepts and event and acts on it
- * @param event The event to act on
- */
- void onEvent(Event event);
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/event/TrueFilter.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/event/TrueFilter.java deleted file mode 100644 index 177dcfbb77..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/event/TrueFilter.java +++ /dev/null @@ -1,37 +0,0 @@ -/*
- * 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.event;
-
-/**
- * An event filter that always returns a true condition
- *
- * @version $$Rev: 539355 $$ $$Date: 2007-05-18 03:05:14 -0700 (Fri, 18 May 2007) $$
- */
-public class TrueFilter implements EventFilter {
-
- /**
- * Performs the actual evaluation on an event. Always returns true
- * in this case
- * @param event The incoming event which is ignored
- * @return true
- */
- public boolean match(Event event) {
- return true;
- }
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/DataExchangeSemantics.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/DataExchangeSemantics.java deleted file mode 100644 index dec01a119b..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/DataExchangeSemantics.java +++ /dev/null @@ -1,34 +0,0 @@ -/*
- * 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.invocation;
-
-/**
- * An invoker or interceptor can optionally implement this interface to indicate if they can
- * enforce the pass-by-value semantics for an operation on remotable interfaces.
- *
- * @version $Rev: 634778 $ $Date: 2008-03-07 10:58:16 -0800 (Fri, 07 Mar 2008) $
- */
-public interface DataExchangeSemantics {
- /**
- * Indicate if the data can be passed in by reference as they won't be mutated.
- * @return true if pass-by-reference is allowed
- */
- boolean allowsPassByReference();
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/Interceptor.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/Interceptor.java deleted file mode 100644 index a5d6daab23..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/Interceptor.java +++ /dev/null @@ -1,40 +0,0 @@ -/*
- * 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.invocation;
-
-/**
- * Synchronous mediation associated with a client- or target- side wire.
- *
- * @version $Rev: 539355 $ $Date: 2007-05-18 03:05:14 -0700 (Fri, 18 May 2007) $
- */
-public interface Interceptor extends Invoker {
-
- /**
- * Sets the next invoker
- * @param next The next invoker
- */
- void setNext(Invoker next);
-
- /**
- * Returns the next invoker or null
- * @return The next Invoker
- */
- Invoker getNext();
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/InvocationChain.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/InvocationChain.java deleted file mode 100644 index 37d15a8704..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/InvocationChain.java +++ /dev/null @@ -1,112 +0,0 @@ -/*
- * 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.invocation;
-
-import org.apache.tuscany.sca.interfacedef.Operation;
-
-/**
- * A wire consists of 1..n invocation chains associated with the operations of its source service contract.
- * <p/>
- * Invocation chains may contain </code>Interceptors</code> that process invocations.
- * <p/>
- * A <code>Message</code> is used to pass data associated with an invocation through the chain.
- *
- * @version $Rev: 632064 $ $Date: 2008-02-28 09:18:51 -0800 (Thu, 28 Feb 2008) $
- */
-public interface InvocationChain {
- /**
- * Returns the target operation for this invocation chain.
- *
- * @return The target operation for this invocation chain
- */
- Operation getTargetOperation();
-
- /**
- * Updates the target operation for this invocation chain.
- *
- * @param operation The new target operation for this invocation chain
- */
- void setTargetOperation(Operation operation);
-
- /**
- * Returns the source operation for this invocation chain.
- *
- * @return The source operation for this invocation chain
- */
- Operation getSourceOperation();
-
- /**
- * Adds an interceptor to the chain. For reference side, it will be added to
- * Phase.REFERENCE. For service side, it will be added to Phase.SERVICE
- *
- * @param interceptor The interceptor to add
- */
- void addInterceptor(Interceptor interceptor);
-
- /**
- * Adds an invoker to the chain
- *
- * @param invoker The invoker to add
- */
- void addInvoker(Invoker invoker);
-
- /**
- * Returns the first invoker in the chain.
- *
- * @return The first invoker in the chain
- */
- Invoker getHeadInvoker();
-
- /**
- * @deprecated This method is not used
- * Returns the last invoker in the chain.
- *
- * @return The last invoker in the chain
- */
- @Deprecated
- Invoker getTailInvoker();
-
- /**
- * @deprecated Please use <code>void addInterceptor(String phase, Interceptor interceptor);</code>
- * Adds an interceptor at the given position in the interceptor stack
- *
- * @param index The position in the interceptor stack to add the interceptor
- * @param interceptor The interceptor to add
- */
- @Deprecated
- void addInterceptor(int index, Interceptor interceptor);
-
- /**
- * Add an interceptor to the given phase
- * @param phase
- * @param interceptor
- */
- void addInterceptor(String phase, Interceptor interceptor);
-
- /**
- * Indicate if the data can be passed in by reference as they won't be mutated.
- * @return true if pass-by-reference is allowed
- */
- boolean allowsPassByReference();
- /**
- * Force the invocation to allow pass-by-reference
- * @param allowsPBR
- */
- void setAllowsPassByReference(boolean allowsPBR);
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/Invoker.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/Invoker.java deleted file mode 100644 index 95efa3d259..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/Invoker.java +++ /dev/null @@ -1,36 +0,0 @@ -/*
- * 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.invocation;
-
-/**
- * Synchronous mediation associated with a client- or target- side wire.
- *
- * @version $Rev: 539355 $ $Date: 2007-05-18 03:05:14 -0700 (Fri, 18 May 2007) $
- */
-public interface Invoker {
-
- /**
- * Process a synchronous wire
- *
- * @param msg The request Message for the wire
- * @return The response Message from the wire
- */
- Message invoke(Message msg);
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/Message.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/Message.java deleted file mode 100644 index b28f6ad483..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/Message.java +++ /dev/null @@ -1,117 +0,0 @@ -/*
- * 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.invocation;
-
-import java.util.Map;
-
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.runtime.EndpointReference;
-
-/**
- * Represents a request, response, or exception flowing through a wire
- *
- * @version $Rev $Date
- */
-public interface Message {
- String QOS_CTX_SECURITY_PRINCIPAL = "PRINCIPAL";
-
- /**
- * Returns the body of the message, which will be the payload or parameters associated with the wire
- * @return The body of the message
- */
- <T> T getBody();
-
- /**
- * Sets the body of the message.
- * @param body The body of the message
- */
- <T> void setBody(T body);
-
- /**
- * Get the end point reference of the source reference
- * @return The end point reference of the reference originating the message
- */
- EndpointReference getFrom();
-
- /**
- * Set the end point reference of the reference originating the message
- * @param from The end point reference of the reference originating the message
- */
- void setFrom(EndpointReference from);
-
- /**
- * Get the end point reference of target service
- * @return The end point reference of the service that the message targets
- */
- EndpointReference getTo();
-
- /**
- * Set the end point reference of target service
- * @param to The end point reference of the service that the message targets
- */
- void setTo(EndpointReference to);
-
- /**
- * Returns the id of the message
- * @return The message Id
- */
- Object getMessageID();
-
- /**
- * Sets the id of the message
- * @param messageId The message ID
- */
- void setMessageID(Object messageId);
-
- /**
- * Determines if the message represents a fault/exception
- *
- * @return true If the message body is a fault object, false if the body is a normal payload
- */
- boolean isFault();
-
- /**
- * Set the message body with a fault object. After this method is called, isFault() returns true.
- *
- * @param fault The fault object represents an exception
- */
- <T> void setFaultBody(T fault);
-
- /**
- * Returns the operation that created the message.
- *
- * @return The operation that created the message
- */
- Operation getOperation();
-
- /**
- * Sets the operation that created the message.
- *
- * @param op The operation that created the message
- */
- void setOperation(Operation op);
-
- /**
- * Returns a map of objects that represents the QoS context that wraps this message such as
- * invoking authenticated principal and so on.
- *
- * @return
- */
- Map<String, Object> getQoSContext();
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/MessageFactory.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/MessageFactory.java deleted file mode 100644 index 9a452b5d54..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/MessageFactory.java +++ /dev/null @@ -1,36 +0,0 @@ -/*
- * 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.invocation;
-
-
-/**
- * A factory for messages
- *
- * @version $Rev $Date
- */
-public interface MessageFactory {
-
- /**
- * Creates a new message.
- *
- * @return The new message
- */
- Message createMessage();
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/Phase.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/Phase.java deleted file mode 100644 index 82b994577f..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/invocation/Phase.java +++ /dev/null @@ -1,59 +0,0 @@ -/*
- * 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.invocation;
-
-/**
- * Tuscany built-in phases for the invocation chain
- *
- * @version $Rev: 639280 $ $Date: 2008-03-20 06:10:11 -0700 (Thu, 20 Mar 2008) $
- */
-public interface Phase {
- // The first phase for outgoing invocations via a reference
- String REFERENCE = "component.reference";
-
- // data transformation and validation
- String REFERENCE_INTERFACE = "reference.interface";
-
- // reference policy handling
- String REFERENCE_POLICY = "reference.policy";
-
- // reference binding invoker
- String REFERENCE_BINDING = "reference.binding";
-
- // The first phase for incoming invocations via a service
- String SERVICE_BINDING = "service.binding";
-
- // service policy handling
- String SERVICE_POLICY = "service.policy";
-
- // data validation and transformation
- String SERVICE_INTERFACE = "service.interface";
-
- // TODO: not sure if we need to have this face
- String SERVICE = "component.service";
-
- // implementation policy handling
- String IMPLEMENTATION_POLICY = "implementation.policy";
-
- // implementation invoker
- String IMPLEMENTATION = "component.implementation";
-
- // String getName();
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/management/ManagementService.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/management/ManagementService.java deleted file mode 100644 index 49bceac82b..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/management/ManagementService.java +++ /dev/null @@ -1,39 +0,0 @@ -/*
- * 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.management;
-
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-
-/**
- * Interface for the management service abstraction. The implementation
- * could be based on a variety of technologies including JMX, WSDM,
- * SNMP etc.
- *
- * @version $Revision: 639280 $ $Date: 2008-03-20 06:10:11 -0700 (Thu, 20 Mar 2008) $
- */
-public interface ManagementService {
-
- /**
- * Registers a component for management.
- *
- * @param name Name of the component.
- * @param component Component to be registered.
- */
- void registerComponent(String name, RuntimeComponent component);
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/BindingProviderFactory.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/BindingProviderFactory.java deleted file mode 100644 index 900450f206..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/BindingProviderFactory.java +++ /dev/null @@ -1,60 +0,0 @@ -/*
- * 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.provider;
-
-import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
-import org.apache.tuscany.sca.runtime.RuntimeComponentService;
-
-/**
- * A factory for creating the runtime artifacts that represent bindings.
- *
- * @version $Rev: 539355 $ $Date: 2007-05-18 03:05:14 -0700 (Fri, 18 May 2007) $
- */
-public interface BindingProviderFactory<M extends Binding> extends ProviderFactory<M> {
-
- /**
- * Creates a new reference binding provider for the given component and
- * reference.
- *
- * @param component The runtime component
- * @param reference The reference on the runtime component
- * @param binding The binding assembly model object
- * @return The binding provider
- */
- ReferenceBindingProvider createReferenceBindingProvider(RuntimeComponent component,
- RuntimeComponentReference reference,
- M binding);
-
- /**
- * Creates a new service binding provider for the given component and
- * service.
- *
- * @param component The runtime component
- * @param service The service on the runtime component
- * @param binding The binding assembly model object
- * @return The binding provider
- */
- ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component,
- RuntimeComponentService service,
- M binding);
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultProviderFactoryExtensionPoint.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultProviderFactoryExtensionPoint.java deleted file mode 100644 index 371f9c9af2..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultProviderFactoryExtensionPoint.java +++ /dev/null @@ -1,370 +0,0 @@ -/*
- * 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.provider;
-
-import java.lang.reflect.Constructor;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.assembly.Implementation;
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.extensibility.ServiceDeclaration;
-import org.apache.tuscany.sca.extensibility.ServiceDiscovery;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
-import org.apache.tuscany.sca.runtime.RuntimeComponentService;
-
-/**
- * Default implementation of a provider factory extension point.
- *
- * @version $Rev: 634558 $ $Date: 2008-03-06 22:35:52 -0800 (Thu, 06 Mar 2008) $
- */
-public class DefaultProviderFactoryExtensionPoint implements ProviderFactoryExtensionPoint {
-
- private ExtensionPointRegistry registry;
- private final Map<Class<?>, ProviderFactory> providerFactories = new HashMap<Class<?>, ProviderFactory>();
- private final List<PolicyProviderFactory> policyProviderFactories = new ArrayList<PolicyProviderFactory>();
- private boolean loaded;
-
- /**
- * The default constructor. Does nothing.
- *
- */
- public DefaultProviderFactoryExtensionPoint(ExtensionPointRegistry registry) {
- this.registry = registry;
- }
-
- /**
- * Add a provider factory.
- *
- * @param providerFactory The provider factory
- */
- public void addProviderFactory(ProviderFactory providerFactory) {
- if(providerFactory instanceof PolicyProviderFactory) {
- policyProviderFactories.add((PolicyProviderFactory)providerFactory);
- }
- providerFactories.put(providerFactory.getModelType(), providerFactory);
- }
-
- /**
- * Remove a provider factory.
- *
- * @param providerFactory The provider factory
- */
- public void removeProviderFactory(ProviderFactory providerFactory) {
- if(providerFactory instanceof PolicyProviderFactory) {
- policyProviderFactories.remove((PolicyProviderFactory)providerFactory);
- }
- providerFactories.remove(providerFactory.getModelType());
- }
-
- /**
- * Returns the provider factory associated with the given model type.
- * @param modelType A model type
- * @return The provider factory associated with the given model type
- */
- public ProviderFactory getProviderFactory(Class<?> modelType) {
- loadProviderFactories();
-
- Class<?>[] classes = modelType.getInterfaces();
- for (Class<?> c : classes) {
- ProviderFactory factory = providerFactories.get(c);
- if (factory != null) {
- return factory;
- }
- }
- return providerFactories.get(modelType);
- }
-
- public List<PolicyProviderFactory> getPolicyProviderFactories() {
- loadProviderFactories();
- return policyProviderFactories;
- }
-
- /**
- * Load provider factories declared under META-INF/services.
- * @param registry
- */
- private void loadProviderFactories() {
- if (loaded)
- return;
-
- loadProviderFactories(BindingProviderFactory.class);
- loadProviderFactories(ImplementationProviderFactory.class);
- loadProviderFactories(PolicyProviderFactory.class);
-
- loaded = true;
- }
-
- /**
- * Load provider factories declared under META-INF/services.
- * @param registry
- * @param factoryClass
- * @return
- */
- private List<ProviderFactory> loadProviderFactories(Class<?> factoryClass) {
-
- // Get the provider factory service declarations
- Set<ServiceDeclaration> factoryDeclarations;
- ServiceDiscovery serviceDiscovery = ServiceDiscovery.getInstance();
- try {
- factoryDeclarations = serviceDiscovery.getServiceDeclarations(factoryClass);
- } catch (Exception e) {
- throw new IllegalStateException(e);
- }
- // Get the target extension point
-
- ProviderFactoryExtensionPoint factoryExtensionPoint =
- registry.getExtensionPoint(ProviderFactoryExtensionPoint.class);
-
- if (factoryExtensionPoint == null) {
- factoryExtensionPoint = new DefaultProviderFactoryExtensionPoint(registry);
- registry.addExtensionPoint(factoryExtensionPoint);
-
- }
-
- List<ProviderFactory> factories = new ArrayList<ProviderFactory>();
-
- for (ServiceDeclaration factoryDeclaration : factoryDeclarations) {
- Map<String, String> attributes = factoryDeclaration.getAttributes();
-
- // Load an implementation provider factory
- if (factoryClass == ImplementationProviderFactory.class) {
- String modelTypeName = attributes.get("model");
-
- // Create a provider factory wrapper and register it
- ImplementationProviderFactory factory =
- new LazyImplementationProviderFactory(registry, modelTypeName, factoryDeclaration);
- factoryExtensionPoint.addProviderFactory(factory);
- factories.add(factory);
-
- } else if (factoryClass == BindingProviderFactory.class) {
-
- // Load a binding provider factory
- String modelTypeName = attributes.get("model");
-
- // Create a provider factory wrapper and register it
- BindingProviderFactory factory =
- new LazyBindingProviderFactory(registry, modelTypeName, factoryDeclaration);
- factoryExtensionPoint.addProviderFactory(factory);
- factories.add(factory);
- } else if (factoryClass == PolicyProviderFactory.class) {
- // Load a policy provider factory
- String modelTypeName = attributes.get("model");
-
- // Create a provider factory wrapper and register it
- PolicyProviderFactory factory =
- new LazyPolicyProviderFactory(registry, modelTypeName, factoryDeclaration);
- factoryExtensionPoint.addProviderFactory(factory);
- factories.add(factory);
-
- }
- }
- return factories;
- }
-
- /**
- * A wrapper around an implementation provider factory allowing lazy
- * loading and initialization of implementation providers.
- */
- private static class LazyBindingProviderFactory implements BindingProviderFactory {
-
- private ExtensionPointRegistry registry;
- private String modelTypeName;
- private ServiceDeclaration factoryDeclaration;
- private BindingProviderFactory factory;
- private Class modelType;
-
- private LazyBindingProviderFactory(ExtensionPointRegistry registry,
- String modelTypeName,
- ServiceDeclaration factoryDeclaration) {
- this.registry = registry;
- this.modelTypeName = modelTypeName;
- this.factoryDeclaration = factoryDeclaration;
- }
-
- @SuppressWarnings("unchecked")
- private BindingProviderFactory getFactory() {
- if (factory == null) {
- try {
- Class<BindingProviderFactory> factoryClass =
- (Class<BindingProviderFactory>)factoryDeclaration.loadClass();
- Constructor<BindingProviderFactory> constructor =
- factoryClass.getConstructor(ExtensionPointRegistry.class);
- factory = constructor.newInstance(registry);
- } catch (Exception e) {
- throw new IllegalStateException(e);
- }
- }
- return factory;
- }
-
- @SuppressWarnings("unchecked")
- public ReferenceBindingProvider createReferenceBindingProvider(RuntimeComponent component,
- RuntimeComponentReference reference,
- Binding binding) {
- return getFactory().createReferenceBindingProvider(component, reference, binding);
- }
-
- @SuppressWarnings("unchecked")
- public ServiceBindingProvider createServiceBindingProvider(RuntimeComponent component,
- RuntimeComponentService service,
- Binding binding) {
- return getFactory().createServiceBindingProvider(component, service, binding);
- }
-
- public Class getModelType() {
- if (modelType == null) {
- try {
- modelType = factoryDeclaration.loadClass(modelTypeName);
- } catch (Exception e) {
- throw new IllegalStateException(e);
- }
- }
- return modelType;
- }
-
- }
-
- /**
- * A wrapper around an implementation provider factory allowing lazy
- * loading and initialization of implementation providers.
- */
- private class LazyImplementationProviderFactory implements ImplementationProviderFactory {
-
- private ExtensionPointRegistry registry;
- private String modelTypeName;
- private ServiceDeclaration providerClass;
- private ImplementationProviderFactory factory;
- private Class modelType;
-
- private LazyImplementationProviderFactory(ExtensionPointRegistry registry,
- String modelTypeName,
- ServiceDeclaration providerClass) {
- this.registry = registry;
- this.modelTypeName = modelTypeName;
- this.providerClass = providerClass;
- }
-
- @SuppressWarnings("unchecked")
- private ImplementationProviderFactory getFactory() {
- if (factory == null) {
- try {
- Class<ImplementationProviderFactory> factoryClass =
- (Class<ImplementationProviderFactory>)providerClass.loadClass();
- Constructor<ImplementationProviderFactory> constructor =
- factoryClass.getConstructor(ExtensionPointRegistry.class);
- factory = constructor.newInstance(registry);
- } catch (Exception e) {
- throw new IllegalStateException(e);
- }
- }
- return factory;
- }
-
- @SuppressWarnings("unchecked")
- public ImplementationProvider createImplementationProvider(RuntimeComponent component,
- Implementation Implementation) {
- return getFactory().createImplementationProvider(component, Implementation);
- }
-
- public Class getModelType() {
- if (modelType == null) {
- try {
-
- modelType = providerClass.loadClass(modelTypeName);
- } catch (Exception e) {
- throw new IllegalStateException(e);
- }
- }
- return modelType;
- }
-
- }
-
- /**
- * A wrapper around an policy provider factory allowing lazy
- * loading and initialization of policy providers.
- */
- private class LazyPolicyProviderFactory implements PolicyProviderFactory {
- private ExtensionPointRegistry registry;
- private String modelTypeName;
- private ServiceDeclaration providerClass;
- private PolicyProviderFactory factory;
- private Class modelType;
-
- private LazyPolicyProviderFactory(ExtensionPointRegistry registry,
- String modelTypeName,
- ServiceDeclaration providerClass) {
- this.registry = registry;
- this.modelTypeName = modelTypeName;
- this.providerClass = providerClass;
- }
-
- @SuppressWarnings("unchecked")
- private PolicyProviderFactory getFactory() {
- if (factory == null) {
- try {
- Class<PolicyProviderFactory> factoryClass = (Class<PolicyProviderFactory>)providerClass.loadClass();
- Constructor<PolicyProviderFactory> constructor =
- factoryClass.getConstructor(ExtensionPointRegistry.class);
- factory = constructor.newInstance(registry);
- } catch (Exception e) {
- throw new IllegalStateException(e);
- }
- }
- return factory;
- }
-
- public PolicyProvider createImplementationPolicyProvider(RuntimeComponent component,
- Implementation implementation) {
- return getFactory().createImplementationPolicyProvider(component, implementation);
- }
-
- public PolicyProvider createReferencePolicyProvider(RuntimeComponent component,
- RuntimeComponentReference reference,
- Binding binding) {
- return getFactory().createReferencePolicyProvider(component, reference, binding);
- }
-
- public PolicyProvider createServicePolicyProvider(RuntimeComponent component,
- RuntimeComponentService service,
- Binding binding) {
- return getFactory().createServicePolicyProvider(component, service, binding);
- }
-
- public Class getModelType() {
- if (modelType == null) {
- try {
- modelType = providerClass.loadClass(modelTypeName);
- } catch (Exception e) {
- throw new IllegalStateException(e);
- }
- }
- return modelType;
- }
-
- }
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultSCADefinitionsProviderExtensionPoint.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultSCADefinitionsProviderExtensionPoint.java deleted file mode 100644 index 4cca3b1e32..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/DefaultSCADefinitionsProviderExtensionPoint.java +++ /dev/null @@ -1,89 +0,0 @@ -/*
- * 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.provider;
-
-import java.lang.reflect.Constructor;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Set;
-
-import org.apache.tuscany.sca.core.ExtensionPointRegistry;
-import org.apache.tuscany.sca.extensibility.ServiceDeclaration;
-import org.apache.tuscany.sca.extensibility.ServiceDiscovery;
-
-/**
- * Concrete Implementation for the SCADefinitionsProviderExtensionPoint
- */
-public class DefaultSCADefinitionsProviderExtensionPoint implements
- SCADefinitionsProviderExtensionPoint {
-
- private ExtensionPointRegistry extensionPointRegistry = null;
-
- private List<SCADefinitionsProvider> scaDefnsProviders = new ArrayList<SCADefinitionsProvider>();
-
- public DefaultSCADefinitionsProviderExtensionPoint(ExtensionPointRegistry extnPtReg) {
- this.extensionPointRegistry = extnPtReg;
- }
-
- public void addSCADefinitionsProvider(SCADefinitionsProvider provider) {
- scaDefnsProviders.add(provider);
- }
-
- public void removeSCADefinitionsProvider(SCADefinitionsProvider provider) {
- scaDefnsProviders.remove(provider);
- }
-
- public List<SCADefinitionsProvider> getSCADefinitionsProviders() {
- if (scaDefnsProviders.isEmpty()) {
- loadProviders();
- }
- return scaDefnsProviders;
- }
-
- private void loadProviders() {
- // Get the provider service declarations
- Set<ServiceDeclaration> defnProviderDecls;
- SCADefinitionsProvider aProvider = null;
- Class providerClass = null;
- Constructor constructor = null;
-
- try {
- defnProviderDecls =
- ServiceDiscovery.getInstance().getServiceDeclarations(SCADefinitionsProvider.class);
-
- for (ServiceDeclaration aDefnProviderDecl : defnProviderDecls) {
- providerClass = aDefnProviderDecl.loadClass();
-
- try {
- constructor = providerClass.getConstructor();
- aProvider = (SCADefinitionsProvider)constructor.newInstance();
- } catch (NoSuchMethodException e1) {
- constructor = providerClass.getConstructor(ExtensionPointRegistry.class);
- aProvider = (SCADefinitionsProvider)constructor.newInstance(extensionPointRegistry);
- }
-
- scaDefnsProviders.add(aProvider);
- }
- } catch (Exception e) {
- throw new RuntimeException(e);
- }
-
- }
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ImplementationProvider.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ImplementationProvider.java deleted file mode 100644 index a9f86c45ca..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ImplementationProvider.java +++ /dev/null @@ -1,68 +0,0 @@ -/*
- * 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.provider;
-
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.invocation.Invoker;
-import org.apache.tuscany.sca.runtime.RuntimeComponentService;
-
-/**
- * A component implementation can implement this interface in order to tie
- * into the Tuscany runtime
- *
- * @version $Rev: 576260 $ $Date: 2007-09-16 22:17:22 -0700 (Sun, 16 Sep 2007) $
- */
-public interface ImplementationProvider {
-
- /**
- * This method will be invoked when the component implementation
- * is activated.
- */
- void start();
-
- /**
- * This method will be invoked when the component implementation
- * is deactivated.
- */
- void stop();
-
- /**
- * Create an invoker for the component implementation in the invocation
- * chain. The invoker will be responsible for calling the implementation
- * logic for the given component.
- *
- * @param service The component service
- * @param operation The operation that the interceptor will handle
- * @return An invoker that handles the invocation logic, null should be
- * returned if no invoker is required
- */
- Invoker createInvoker(RuntimeComponentService service, Operation operation);
-
- /**
- * For bindings that invoke one-way callback operations asynchronously,
- * there is no need to perform a thread switch before calling the invoker.
- * This method indicates whether the binding has this capability.
- *
- * @return true if the callback invoker is able to invoke one-way operations
- * asynchronously, false if all invocations are synchronous
- */
- boolean supportsOneWayInvocation();
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ImplementationProviderFactory.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ImplementationProviderFactory.java deleted file mode 100644 index 084056278c..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ImplementationProviderFactory.java +++ /dev/null @@ -1,42 +0,0 @@ -/*
- * 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.provider;
-
-import org.apache.tuscany.sca.assembly.Implementation;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-
-/**
- * An interface for factories that create implementation providers.
- *
- * @version $Rev: 539355 $ $Date: 2007-05-18 03:05:14 -0700 (Fri, 18 May 2007) $
- */
-public interface ImplementationProviderFactory<M extends Implementation> extends ProviderFactory<M> {
-
- /**
- * Creates a new implementation provider for the given
- * component.
- *
- * @param component The runtime component
- * @param Implementation The implementation type
- * @return The implementation provider
- */
- ImplementationProvider createImplementationProvider(RuntimeComponent component, M Implementation);
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/PolicyImplementor.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/PolicyImplementor.java deleted file mode 100644 index 7e798549b3..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/PolicyImplementor.java +++ /dev/null @@ -1,38 +0,0 @@ -/*
- * 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.provider;
-
-import java.util.List;
-
-import javax.xml.namespace.QName;
-
-/**
- * This interface can be optionally implemented by the Binding or Implementation providers to
- * indicate if they implement the policies in the binding/implementation provider.
- *
- * @version $Rev: 634558 $ $Date: 2008-03-06 22:35:52 -0800 (Thu, 06 Mar 2008) $
- */
-public interface PolicyImplementor {
- /**
- * Get a list of policy names that are implemented by this policy implementor
- * @return A list of policy names
- */
- List<QName> getImplementedPolicies();
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/PolicyProvider.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/PolicyProvider.java deleted file mode 100644 index b7306e48dd..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/PolicyProvider.java +++ /dev/null @@ -1,41 +0,0 @@ -/*
- * 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.provider;
-
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.invocation.Interceptor;
-
-/**
- * @version $Rev: 634558 $ $Date: 2008-03-06 22:35:52 -0800 (Thu, 06 Mar 2008) $
- */
-public interface PolicyProvider {
- /**
- * Create an interceptor for a given operation
- * @param operation
- * @return An interceptor that realize the policySet
- */
- Interceptor createInterceptor(Operation operation);
-
- /**
- * Get the phase that the interceptor should be added
- * @return The phase that this interceptor belongs to
- */
- String getPhase();
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/PolicyProviderFactory.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/PolicyProviderFactory.java deleted file mode 100644 index d7e4fee1d9..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/PolicyProviderFactory.java +++ /dev/null @@ -1,63 +0,0 @@ -/*
- * 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.provider;
-
-import org.apache.tuscany.sca.assembly.Binding;
-import org.apache.tuscany.sca.assembly.Implementation;
-import org.apache.tuscany.sca.policy.Policy;
-import org.apache.tuscany.sca.runtime.RuntimeComponent;
-import org.apache.tuscany.sca.runtime.RuntimeComponentReference;
-import org.apache.tuscany.sca.runtime.RuntimeComponentService;
-
-/**
- * @version $Rev: 634558 $ $Date: 2008-03-06 22:35:52 -0800 (Thu, 06 Mar 2008) $
- */
-public interface PolicyProviderFactory<M extends Policy> extends ProviderFactory<M> {
- /**
- * Create policy provider for a given reference binding
- * @param component
- * @param reference
- * @param binding
- * @return
- */
- PolicyProvider createReferencePolicyProvider(RuntimeComponent component,
- RuntimeComponentReference reference,
- Binding binding);
-
- /**
- * Create policy provider for a given service binding
- * @param component
- * @param service
- * @param binding
- * @return
- */
- PolicyProvider createServicePolicyProvider(RuntimeComponent component,
- RuntimeComponentService service,
- Binding binding);
-
- /**
- * Create policy provider for a given component implementation
- * @param component
- * @param implementation
- * @return
- */
- PolicyProvider createImplementationPolicyProvider(RuntimeComponent component, Implementation implementation);
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ProviderFactory.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ProviderFactory.java deleted file mode 100644 index e0c03b3db1..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ProviderFactory.java +++ /dev/null @@ -1,36 +0,0 @@ -/*
- * 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.provider;
-
-/**
- * A factory for runtime providers.
- *
- * @version $Rev: 537206 $ $Date: 2007-05-11 08:14:19 -0700 (Fri, 11 May 2007) $
- */
-public interface ProviderFactory<M> {
-
- /**
- * The model type that this factory creates providers for.
- *
- * @return the model type
- */
- Class<M> getModelType();
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ProviderFactoryExtensionPoint.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ProviderFactoryExtensionPoint.java deleted file mode 100644 index 63c8cc162b..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ProviderFactoryExtensionPoint.java +++ /dev/null @@ -1,63 +0,0 @@ -/*
- * 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.provider;
-
-import java.util.List;
-
-
-/**
- * An extension point for provider factories. Holds all of the provider
- * factories from loaded extension points. Allows a provider factory
- * to be located based on a given model type. Hence the runtime can
- * generate runtime artifacts from the in memory assembly model.
- *
- * @version $Rev: 634558 $ $Date: 2008-03-06 22:35:52 -0800 (Thu, 06 Mar 2008) $
- */
-public interface ProviderFactoryExtensionPoint {
-
-
- /**
- * Add a provider factory.
- *
- * @param providerFactory The provider factory
- */
- void addProviderFactory(ProviderFactory providerFactory);
-
- /**
- * Remove a provider factory.
- *
- * @param providerFactory The provider factory
- */
- void removeProviderFactory(ProviderFactory providerFactory);
-
- /**
- * Returns the provider factory associated with the given model type.
- * @param modelType A model type
- * @return The provider factory associated with the given model type
- */
- ProviderFactory getProviderFactory(Class<?> modelType);
-
- /**
- * Get a list of registered PolicyProviderFactory
- * @return a list of registered PolicyProviderFactory
- */
- List<PolicyProviderFactory> getPolicyProviderFactories();
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ReferenceBindingProvider.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ReferenceBindingProvider.java deleted file mode 100644 index d0a1b53563..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ReferenceBindingProvider.java +++ /dev/null @@ -1,76 +0,0 @@ -/*
- * 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.provider;
-
-import org.apache.tuscany.sca.interfacedef.InterfaceContract;
-import org.apache.tuscany.sca.interfacedef.Operation;
-import org.apache.tuscany.sca.invocation.Invoker;
-
-/**
- * A reference binding implementation can options implement this
- * interface to tie into the Tuscany SCA runtime
- *
- * @version $Rev: 576260 $ $Date: 2007-09-16 22:17:22 -0700 (Sun, 16 Sep 2007) $
- */
-public interface ReferenceBindingProvider {
-
- /**
- * This method will be invoked when the component reference binding is
- * activated.
- */
- void start();
-
- /**
- * This method will be invoked when the component reference binding is
- * deactivated.
- */
- void stop();
-
- /**
- * Create an invoker for the reference binding in the invocation chain. The
- * invoker is responsible for making the outbound invocation over the
- * binding protocol.
- *
- * @param operation The operation that the interceptor will handle
- * @return An invoker that handles the invocation logic, null should be
- * returned if no invoker is required
- */
- Invoker createInvoker(Operation operation);
-
- /**
- * Get the effective interface contract imposed by the binding. For example,
- * it will be interface contract introspected from the WSDL portType used by
- * the endpoint for a WebService binding.
- *
- * @return The effective interface contract, if null is returned, the
- * interface contract for the component reference will be used
- */
- InterfaceContract getBindingInterfaceContract();
-
- /**
- * For bindings that invoke one-way operations asynchronously, there is no
- * need to perform a thread switch before calling the invoker. This method
- * indicates whether the binding has this capability.
- *
- * @return true if the binding invoker is able to invoke one-way operations
- * asynchronously, false if all invocations are synchronous
- */
- boolean supportsOneWayInvocation();
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProvider.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProvider.java deleted file mode 100644 index b85d19ba9a..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProvider.java +++ /dev/null @@ -1,31 +0,0 @@ -/*
- * 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.provider;
-
-import org.apache.tuscany.sca.definitions.SCADefinitions;
-
-/**
- * Models a provider of SCA Definitions. Typically SCA Definitions providers
- * may either load a definitions.xml file or create the SCA Definitions model
- * programmatically.
- */
-public interface SCADefinitionsProvider {
- SCADefinitions getSCADefinition() throws SCADefinitionsProviderException ;
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderException.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderException.java deleted file mode 100644 index 9be99c389c..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderException.java +++ /dev/null @@ -1,30 +0,0 @@ -/*
- * 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.provider;
-
-/**
- * @version $Rev: 643489 $ $Date: 2008-04-01 10:06:42 -0800 (Tue, 01 Apr 2008) $
- */
-public class SCADefinitionsProviderException extends Exception {
-
- public SCADefinitionsProviderException(Throwable e) {
- super(e);
- }
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderExtensionPoint.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderExtensionPoint.java deleted file mode 100644 index 4d91480295..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/SCADefinitionsProviderExtensionPoint.java +++ /dev/null @@ -1,33 +0,0 @@ -/*
- * 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.provider;
-
-import java.util.List;
-
-/**
- * An extension point for SCA Definitions Providers. SCA Definition providers, load SCA Definitions
- * items that are being specifically contributed by the module that hosts the provider in question.
- */
-public interface SCADefinitionsProviderExtensionPoint {
-
- void addSCADefinitionsProvider(SCADefinitionsProvider provider);
- void removeSCADefinitionsProvider(SCADefinitionsProvider provider);
- List<SCADefinitionsProvider> getSCADefinitionsProviders();
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ServiceBindingProvider.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ServiceBindingProvider.java deleted file mode 100644 index db08098ae8..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ServiceBindingProvider.java +++ /dev/null @@ -1,63 +0,0 @@ -/*
- * 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.provider;
-
-import org.apache.tuscany.sca.interfacedef.InterfaceContract;
-
-/**
- * A service binding can optionally implement this interface to tie
- * into the Tuscany SCA runtime
- *
- * @version $Rev: 576260 $ $Date: 2007-09-16 22:17:22 -0700 (Sun, 16 Sep 2007) $
- */
-public interface ServiceBindingProvider {
- /**
- * This method will be invoked when the component service binding is
- * activated.
- */
- void start();
-
- /**
- * This method will be invoked when the component service binding is
- * deactivated.
- */
- void stop();
-
- /**
- * Get the effective interface contract imposed by the binding. For example,
- * it will be interface contract introspected from the WSDL portType used by
- * the endpoint for a WebService binding.
- *
- * @return The effective interface contract, if null is returned, the
- * interface contract for the component service will be used
- */
- InterfaceContract getBindingInterfaceContract();
-
- /**
- * For bindings that invoke one-way callback operations asynchronously,
- * there is no need to perform a thread switch before calling the invoker.
- * This method indicates whether the binding has this capability.
- *
- * @return true if the callback invoker is able to invoke one-way operations
- * asynchronously, false if all invocations are synchronous
- */
- boolean supportsOneWayInvocation();
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DefaultWireProcessorExtensionPoint.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DefaultWireProcessorExtensionPoint.java deleted file mode 100644 index fb58c72262..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DefaultWireProcessorExtensionPoint.java +++ /dev/null @@ -1,63 +0,0 @@ -/*
- * 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.ArrayList;
-import java.util.List;
-
-
-/**
- * The default implementation of a <code>WireProcessorExtensionPoint</code>
- *
- * @version $Rev: 539355 $ $Date: 2007-05-18 03:05:14 -0700 (Fri, 18 May 2007) $
- */
-public class DefaultWireProcessorExtensionPoint implements RuntimeWireProcessorExtensionPoint {
-
- /**
- * The list of WireProcessors available to the runtime
- */
- private final List<RuntimeWireProcessor> processors = new ArrayList<RuntimeWireProcessor>();
-
- /**
- * Registers a wire-processor in the runtime
- *
- * @param processor The processor to register
- */
- public void addWireProcessor(RuntimeWireProcessor processor) {
- processors.add(processor);
- }
-
- /**
- * De-registers a wire-processor in the runtime
- *
- * @param processor The processor to de-register
- */
- public void removeWireProcessor(RuntimeWireProcessor processor) {
- processors.remove(processor);
- }
-
- /**
- * Returns a list of registered wire-processors.
- *
- * @return The list of wire processors
- */
- public List<RuntimeWireProcessor> getWireProcessors() {
- return processors;
- }
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/EndpointReference.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/EndpointReference.java deleted file mode 100644 index 0e7a1ce103..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/EndpointReference.java +++ /dev/null @@ -1,93 +0,0 @@ -/*
- * 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);
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ReferenceParameters.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ReferenceParameters.java deleted file mode 100644 index b4ec354988..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ReferenceParameters.java +++ /dev/null @@ -1,69 +0,0 @@ -/*
- * 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;
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponent.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponent.java deleted file mode 100644 index f640d9a227..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponent.java +++ /dev/null @@ -1,83 +0,0 @@ -/*
- * 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();
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentContext.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentContext.java deleted file mode 100644 index f10c6c6e5d..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentContext.java +++ /dev/null @@ -1,104 +0,0 @@ -/*
- * 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);
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentReference.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentReference.java deleted file mode 100644 index f30c92452b..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentReference.java +++ /dev/null @@ -1,99 +0,0 @@ -/*
- * 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);
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentService.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentService.java deleted file mode 100644 index 002bc90010..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeComponentService.java +++ /dev/null @@ -1,138 +0,0 @@ -/*
- * 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);
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeWire.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeWire.java deleted file mode 100644 index 104a490fa4..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeWire.java +++ /dev/null @@ -1,101 +0,0 @@ -/*
- * 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;
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeWireProcessor.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeWireProcessor.java deleted file mode 100644 index a828995c5a..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeWireProcessor.java +++ /dev/null @@ -1,35 +0,0 @@ -/*
- * 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);
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeWireProcessorExtensionPoint.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeWireProcessorExtensionPoint.java deleted file mode 100644 index 30630cc2af..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeWireProcessorExtensionPoint.java +++ /dev/null @@ -1,53 +0,0 @@ -/*
- * 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();
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/DuplicateRecordException.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/DuplicateRecordException.java deleted file mode 100644 index 465b385d57..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/DuplicateRecordException.java +++ /dev/null @@ -1,45 +0,0 @@ -/*
- * 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);
- }
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/RecoveryListener.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/RecoveryListener.java deleted file mode 100644 index 728faf5d0c..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/RecoveryListener.java +++ /dev/null @@ -1,46 +0,0 @@ -/*
- * 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();
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/Store.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/Store.java deleted file mode 100644 index 45bce4d8fb..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/Store.java +++ /dev/null @@ -1,96 +0,0 @@ -/*
- * 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;
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/StoreException.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/StoreException.java deleted file mode 100644 index 24f8c1a8fd..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/StoreException.java +++ /dev/null @@ -1,46 +0,0 @@ -/*
- * 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);
- }
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/StoreExpirationEvent.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/StoreExpirationEvent.java deleted file mode 100644 index 8798f31138..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/StoreExpirationEvent.java +++ /dev/null @@ -1,71 +0,0 @@ -/*
- * 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;
- }
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/StoreMonitor.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/StoreMonitor.java deleted file mode 100644 index 7cbf4c5ea6..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/StoreMonitor.java +++ /dev/null @@ -1,71 +0,0 @@ -/*
- * 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);
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/StoreReadException.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/StoreReadException.java deleted file mode 100644 index 9e05090845..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/StoreReadException.java +++ /dev/null @@ -1,45 +0,0 @@ -/*
- * 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);
- }
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/StoreWriteException.java b/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/StoreWriteException.java deleted file mode 100644 index 024c3af2f0..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/java/org/apache/tuscany/sca/store/StoreWriteException.java +++ /dev/null @@ -1,45 +0,0 @@ -/*
- * 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);
- }
-
-}
diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint b/branches/sca-android-r643746/modules/core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint deleted file mode 100644 index e9de1f135f..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.ProviderFactoryExtensionPoint +++ /dev/null @@ -1,18 +0,0 @@ -# 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 diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProviderExtensionPoint b/branches/sca-android-r643746/modules/core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProviderExtensionPoint deleted file mode 100644 index 2f700671ca..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.provider.SCADefinitionsProviderExtensionPoint +++ /dev/null @@ -1,19 +0,0 @@ -# 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 diff --git a/branches/sca-android-r643746/modules/core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.RuntimeWireProcessorExtensionPoint b/branches/sca-android-r643746/modules/core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.RuntimeWireProcessorExtensionPoint deleted file mode 100644 index 95591dca5d..0000000000 --- a/branches/sca-android-r643746/modules/core-spi/src/main/resources/META-INF/services/org.apache.tuscany.sca.runtime.RuntimeWireProcessorExtensionPoint +++ /dev/null @@ -1,18 +0,0 @@ -# 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 |