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/05/01 19:53:11 UTC
svn commit: r534172 -
/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/
Author: rfeng
Date: Tue May 1 10:53:10 2007
New Revision: 534172
URL: http://svn.apache.org/viewvc?view=rev&rev=534172
Log:
Add RuntimeComponent, RuntimeComponentReference and RuntimeWire to extend the models with runtime
behaviors/metadata
Added:
incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/RuntimeComponent.java (with props)
incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/RuntimeComponentReference.java (with props)
incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/RuntimeWire.java (with props)
Modified:
incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ImplementationProvider.java
incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ReferenceBindingProvider.java
incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ServiceBindingProvider.java
Modified: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ImplementationProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ImplementationProvider.java?view=diff&rev=534172&r1=534171&r2=534172
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ImplementationProvider.java (original)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ImplementationProvider.java Tue May 1 10:53:10 2007
@@ -23,6 +23,7 @@
import org.apache.tuscany.assembly.ComponentService;
import org.apache.tuscany.interfacedef.InterfaceContract;
import org.apache.tuscany.interfacedef.Operation;
+import org.apache.tuscany.spi.Scope;
import org.apache.tuscany.spi.wire.Interceptor;
/**
@@ -49,10 +50,30 @@
/**
* Get the effective interface contract imposed by the implementation.
*
- * @param component The component
* @param service The component service
- * @return The effective interface contract
+ * @return The effective interface contract, if null is returned, the interface contract
+ * for the component service will be used
*/
- InterfaceContract getImplementationInterfaceContract(Component component, ComponentService service);
+ InterfaceContract getImplementationInterfaceContract(ComponentService service);
+ /**
+ * Get the scope for the component implementation
+ * @return The scope for the component implementation, if null is returned, STATELESS
+ * will be used
+ */
+ Scope getScope();
+
+ /**
+ * Create a local instance to represent the component service
+ * @param component The component
+ * @param service The component service
+ * @return A new instance to represent the component service
+ */
+ Object createInstance(RuntimeComponent component, ComponentService service);
+
+ /**
+ * Configure the component by adding additional metadata for the component
+ * @param component The runtime component
+ */
+ void configure(RuntimeComponent component);
}
Modified: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ReferenceBindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ReferenceBindingProvider.java?view=diff&rev=534172&r1=534171&r2=534172
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ReferenceBindingProvider.java (original)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ReferenceBindingProvider.java Tue May 1 10:53:10 2007
@@ -48,7 +48,10 @@
* the endpoint for a WebService binding.
*
* @param model The model object
- * @return The effective interface contract
+ * @return The effective interface contract, if null is returned, the interface contract
+ * for the component reference will be used
*/
InterfaceContract getBindingInterfaceContract(ComponentReference reference);
+
+
}
Added: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/RuntimeComponent.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/RuntimeComponent.java?view=auto&rev=534172
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/RuntimeComponent.java (added)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/RuntimeComponent.java Tue May 1 10:53:10 2007
@@ -0,0 +1,38 @@
+/*
+ * 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.osoa.sca.ComponentContext;
+
+/**
+ * The runtime component
+ * @version $Rev$ $Date$
+ */
+public interface RuntimeComponent extends Component, ComponentContext {
+ /**
+ * @param configuration
+ */
+ void setImplementationConfiguration(Object configuration);
+ /**
+ * @return
+ */
+ Object getImplementationConfiguration();
+}
Propchange: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/RuntimeComponent.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/RuntimeComponent.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/RuntimeComponentReference.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/RuntimeComponentReference.java?view=auto&rev=534172
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/RuntimeComponentReference.java (added)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/RuntimeComponentReference.java Tue May 1 10:53:10 2007
@@ -0,0 +1,38 @@
+/*
+ * 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 java.util.List;
+
+import org.apache.tuscany.assembly.ComponentReference;
+
+/**
+ * @version $Rev$ $Date$
+ */
+public interface RuntimeComponentReference extends ComponentReference {
+ /**
+ * @param wire
+ */
+ void addRuntimeWire(RuntimeWire wire);
+ /**
+ * @return
+ */
+ List<RuntimeWire> getRuntimeWires();
+}
Propchange: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/RuntimeComponentReference.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/RuntimeComponentReference.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Added: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/RuntimeWire.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/RuntimeWire.java?view=auto&rev=534172
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/RuntimeWire.java (added)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/RuntimeWire.java Tue May 1 10:53:10 2007
@@ -0,0 +1,80 @@
+/*
+ * 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 java.util.List;
+
+import org.apache.tuscany.assembly.Binding;
+import org.apache.tuscany.assembly.ComponentReference;
+import org.apache.tuscany.assembly.ComponentService;
+import org.apache.tuscany.spi.wire.InvocationChain;
+
+/**
+ * The runtime wire that connects a component reference to a component service
+ * (or an external service) over the selected binding
+ *
+ * @version $Rev$ $Date$
+ */
+public interface RuntimeWire {
+ /**
+ * Get the source of the wire
+ *
+ * @return
+ */
+ ComponentReference getSource();
+
+ /**
+ * Get the reference binding
+ *
+ * @return
+ */
+ Binding getSourceBinding();
+
+ /**
+ * Get the target of the wire. It will be null if the binding is
+ *
+ * @return
+ */
+ ComponentService getTarget();
+
+ /**
+ * @return
+ */
+ Binding getTargetBinding();
+
+ /**
+ * 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();
+
+ /**
+ * Returns the invocation chains for callback service operations associated
+ * with the wire
+ *
+ * @return the invocation chains for callback service operations associated
+ * with the wire
+ */
+ List<InvocationChain> getCallbackInvocationChains();
+
+}
Propchange: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/RuntimeWire.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/RuntimeWire.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Modified: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ServiceBindingProvider.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ServiceBindingProvider.java?view=diff&rev=534172&r1=534171&r2=534172
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ServiceBindingProvider.java (original)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/core/ServiceBindingProvider.java Tue May 1 10:53:10 2007
@@ -34,7 +34,8 @@
* the endpoint for a WebService binding.
*
* @param service The component service that owns the service binding
- * @return The effective interface contract
+ * @return The effective interface contract, if null is returned, the interface contract
+ * for the component service will be used
*/
InterfaceContract getBindingInterfaceContract(ComponentService service);
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org