summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/core-spi/src/main
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-02-19 03:25:33 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2010-02-19 03:25:33 +0000
commit5cf2cf2306522c7bd3b420e7ce6e362ce3b743f1 (patch)
tree47267ee62cf25e9653bfcc2640e17a3f6d9699a6 /sca-java-2.x/trunk/modules/core-spi/src/main
parentf7ddb95d8ec781115b7e5cbb026ca0fab00bba85 (diff)
Fix for TUSCANY-3466
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@911687 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/core-spi/src/main')
-rw-r--r--sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ImplementationProvider.java14
-rw-r--r--sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/PolicyProvider.java12
-rw-r--r--sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ReferenceBindingProvider.java15
-rw-r--r--sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/RuntimeProvider.java35
-rw-r--r--sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ServiceBindingProvider.java13
5 files changed, 39 insertions, 50 deletions
diff --git a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ImplementationProvider.java b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ImplementationProvider.java
index 015c673d66..c346463023 100644
--- a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ImplementationProvider.java
+++ b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ImplementationProvider.java
@@ -29,19 +29,7 @@ import org.apache.tuscany.sca.runtime.RuntimeComponentService;
*
* @version $Rev$ $Date$
*/
-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();
+public interface ImplementationProvider extends RuntimeProvider {
/**
* Create an invoker for the component implementation in the invocation
diff --git a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/PolicyProvider.java b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/PolicyProvider.java
index 35b64ad56f..92af4c37a0 100644
--- a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/PolicyProvider.java
+++ b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/PolicyProvider.java
@@ -25,7 +25,7 @@ import org.apache.tuscany.sca.invocation.PhasedInterceptor;
/**
* @version $Rev$ $Date$
*/
-public interface PolicyProvider {
+public interface PolicyProvider extends RuntimeProvider {
/**
* Create an interceptor for a given operation
*
@@ -51,14 +51,4 @@ public interface PolicyProvider {
* binding that will be modified
*/
void configureBinding(Object configuration);
-
- /**
- * Start the provider
- */
- void start();
-
- /**
- * Stop the provider
- */
- void stop();
}
diff --git a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ReferenceBindingProvider.java b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ReferenceBindingProvider.java
index b3ab1d8b87..20314a9978 100644
--- a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ReferenceBindingProvider.java
+++ b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ReferenceBindingProvider.java
@@ -29,20 +29,7 @@ import org.apache.tuscany.sca.invocation.Invoker;
*
* @version $Rev$ $Date$
*/
-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();
-
+public interface ReferenceBindingProvider extends RuntimeProvider {
/**
* Create an invoker for the reference binding in the invocation chain. The
* invoker is responsible for making the outbound invocation over the
diff --git a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/RuntimeProvider.java b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/RuntimeProvider.java
new file mode 100644
index 0000000000..2afd44af31
--- /dev/null
+++ b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/RuntimeProvider.java
@@ -0,0 +1,35 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.tuscany.sca.provider;
+
+/**
+ * The base interface for runtime providers that can be started or stoppped
+ */
+public interface RuntimeProvider {
+ /**
+ * This method will be invoked when the corresponding SCA component is started.
+ */
+ void start();
+
+ /**
+ * This method will be invoked when the corresponding SCA component is stopped
+ */
+ void stop();
+}
diff --git a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ServiceBindingProvider.java b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ServiceBindingProvider.java
index e15234a549..a1739db2d2 100644
--- a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ServiceBindingProvider.java
+++ b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/provider/ServiceBindingProvider.java
@@ -27,18 +27,7 @@ import org.apache.tuscany.sca.interfacedef.InterfaceContract;
*
* @version $Rev$ $Date$
*/
-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();
+public interface ServiceBindingProvider extends RuntimeProvider {
/**
* Get the effective interface contract imposed by the binding. For example,