You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by rf...@apache.org on 2007/04/27 23:01:00 UTC

svn commit: r533222 - in /incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core: ImplementationActivator.java ReferenceBindingActivator.java ServiceBindingActivator.java

Author: rfeng
Date: Fri Apr 27 14:00:59 2007
New Revision: 533222

URL: http://svn.apache.org/viewvc?view=rev&rev=533222
Log:
Add activator interfaces for Component Implementation, Reference Binding and Service Binding

Added:
    incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ImplementationActivator.java   (with props)
    incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ReferenceBindingActivator.java   (with props)
    incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ServiceBindingActivator.java   (with props)

Added: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ImplementationActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ImplementationActivator.java?view=auto&rev=533222
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ImplementationActivator.java (added)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ImplementationActivator.java Fri Apr 27 14:00:59 2007
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.    
+ */
+
+package org.apache.tuscany.core;
+
+import org.apache.tuscany.assembly.Component;
+
+/**
+ * A component implementation can optionally implement this interface to control
+ * how a component is started ot stopped.
+ * 
+ * @version $Rev$ $Date$
+ */
+public interface ImplementationActivator {
+    /**
+     * This method will be invoked when a component implemented by this
+     * implementation is activated.
+     * 
+     * @param component The component to be started
+     */
+    void start(Component component);
+
+    /**
+     * This method will be invoked when a component implemented by this
+     * implementation is deactivated.
+     * 
+     * @param component The component to be stopped
+     */
+    void stop(Component component);
+}

Propchange: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ImplementationActivator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ImplementationActivator.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ReferenceBindingActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ReferenceBindingActivator.java?view=auto&rev=533222
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ReferenceBindingActivator.java (added)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ReferenceBindingActivator.java Fri Apr 27 14:00:59 2007
@@ -0,0 +1,49 @@
+/*
+ * 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.core;
+
+import org.apache.tuscany.assembly.Component;
+import org.apache.tuscany.assembly.ComponentReference;
+
+/**
+ * A binding can optionally implement this interface to control how the
+ * reference binding is started or stopped.
+ * 
+ * @version $Rev$ $Date$
+ */
+public interface ReferenceBindingActivator {
+    /**
+     * This method will be invoked when the reference binding is activated for
+     * the given component reference
+     * 
+     * @param component The component that owns the reference
+     * @param reference The reference that owns the binding
+     */
+    void start(Component component, ComponentReference reference);
+
+    /**
+     * This method will be invoked when the reference binding is deactivated for
+     * the given component reference
+     * 
+     * @param component The component that owns the reference
+     * @param reference The reference that owns the binding
+     */
+    void stop(Component component, ComponentReference reference);
+}

Propchange: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ReferenceBindingActivator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ReferenceBindingActivator.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ServiceBindingActivator.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ServiceBindingActivator.java?view=auto&rev=533222
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ServiceBindingActivator.java (added)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ServiceBindingActivator.java Fri Apr 27 14:00:59 2007
@@ -0,0 +1,49 @@
+/*
+ * 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.core;
+
+import org.apache.tuscany.assembly.Component;
+import org.apache.tuscany.assembly.ComponentService;
+
+/**
+ * A binding can optionally implement this interface to control how the service
+ * binding is started or stopped.
+ * 
+ * @version $Rev$ $Date$
+ */
+public interface ServiceBindingActivator {
+    /**
+     * This method will be invoked when a service binding is activated for the
+     * given component service.
+     * 
+     * @param component The SCA component
+     * @param service The service that owns the binding
+     */
+    void start(Component component, ComponentService service);
+
+    /**
+     * This method will be invoked when a service binding is deactivated or the
+     * given component service.
+     * 
+     * @param component The SCA component
+     * @param service The service that owns the binding
+     */
+    void stop(Component component, ComponentService service);
+}

Propchange: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ServiceBindingActivator.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ServiceBindingActivator.java
------------------------------------------------------------------------------
    svn:keywords = Rev Date



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org