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/19 01:57:25 UTC
svn commit: r530208 - in /incubator/tuscany/java/sca/modules:
core-spi/src/main/java/org/apache/tuscany/spi/component/
core/src/main/java/org/apache/tuscany/core/implementation/composite/
Author: rfeng
Date: Wed Apr 18 16:57:24 2007
New Revision: 530208
URL: http://svn.apache.org/viewvc?view=rev&rev=530208
Log:
Provide references to the model object for the runtime metadata
Modified:
incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/Component.java
incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/Reference.java
incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/Service.java
incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/implementation/composite/ReferenceImpl.java
incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/implementation/composite/ServiceImpl.java
Modified: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/Component.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/Component.java?view=diff&rev=530208&r1=530207&r2=530208
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/Component.java (original)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/Component.java Wed Apr 18 16:57:24 2007
@@ -28,133 +28,138 @@
/**
* The runtime instantiation of an SCA component
- *
- * @version $$Rev$$ $$Date$$
+ *
+ * @version $$Rev$$ $$Date: 2007-04-15 03:53:20 -0700 (Sun, 15 Apr
+ * 2007) $$
*/
public interface Component extends Invocable {
/**
* Returns the SCA ComponentContext for this component.
- *
+ *
* @return the SCA ComponentContext for this component
*/
ComponentContext getComponentContext();
/**
- * Returns a collection of wires for the component associated with a reference.
- *
+ * Returns a collection of wires for the component associated with a
+ * reference.
+ *
* @param name the reference name
- * @return a collection of wires for the component associated with the reference
+ * @return a collection of wires for the component associated with the
+ * reference
*/
List<Wire> getWires(String name);
/**
* Returns the default property values associated with the component.
- *
+ *
* @return default property values associated with the component.
*/
Map<String, Property> getDefaultPropertyValues();
/**
* Sets the default property values associated with the component.
- *
- * @param defaultPropertyValues Default property values associated with the component.
+ *
+ * @param defaultPropertyValues Default property values associated with the
+ * component.
*/
void setDefaultPropertyValues(Map<String, Property> defaultPropertyValues);
/**
- * Returns the ScopeContainer responsible for managing implementation instance or null if a ScopeContainer is not
- * associated with the Component
- *
+ * Returns the ScopeContainer responsible for managing implementation
+ * instance or null if a ScopeContainer is not associated with the Component
+ *
* @return the scope container
*/
ScopeContainer getScopeContainer();
-
void configureProperty(String propertyName);
-
+
/**
* Returns the component scope
- *
+ *
* @return the component scope
*/
- @Deprecated
+
Scope getScope();
/**
* Sets the scope container associated with the component
- *
+ *
* @param scopeContainer the scope container associated with the component
*/
- @Deprecated
+
void setScopeContainer(ScopeContainer scopeContainer);
/**
- * Returns true if invocation dispatching can be optimized, i.e. invocation chains are not required
- *
- * @return true if invocation dispatching can be optimized, i.e. invocation chains are not required
+ * Returns true if invocation dispatching can be optimized, i.e. invocation
+ * chains are not required
+ *
+ * @return true if invocation dispatching can be optimized, i.e. invocation
+ * chains are not required
*/
- @Deprecated
+
boolean isOptimizable();
/**
* Registers a service of this composite.
- *
+ *
* @param service the service to add as a child
* @throws RegistrationException
*/
- @Deprecated
+
void register(Service service) throws RegistrationException;
/**
* Registers a reference of this composite.
- *
+ *
* @param reference the reference to add as a child
* @throws RegistrationException
*/
- @Deprecated
+
void register(Reference reference) throws RegistrationException;
/**
* Returns the service with the given name or null if not found
- *
+ *
* @param name the service name which is relative to the composite
* @return the service with the given name or null if not found
*/
- @Deprecated
+
Service getService(String name);
/**
* Returns the reference with the given name or null if not found
- *
+ *
* @param name the reference name which is relative to the composite
* @return the reference with the given name or null if not found
*/
- @Deprecated
+
Reference getReference(String name);
/**
* Attaches a callback wire to the comoponent
- *
+ *
* @param wire the wire to attach
*/
- @Deprecated
+
void attachCallbackWire(Wire wire);
/**
* Attaches a wire to a component reference
- *
+ *
* @param wire the wire to attach
*/
- @Deprecated
+
void attachWire(Wire wire);
/**
* Attaches a set of wires to a component reference. Used for multiplicity.
- *
+ *
* @param wires the wire to attach
*/
- @Deprecated
+
void attachWires(List<Wire> wires);
}
Modified: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/Reference.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/Reference.java?view=diff&rev=530208&r1=530207&r2=530208
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/Reference.java (original)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/Reference.java Wed Apr 18 16:57:24 2007
@@ -20,7 +20,7 @@
import java.util.List;
-import org.apache.tuscany.assembly.Contract;
+import org.apache.tuscany.assembly.CompositeReference;
/**
* The runtime instantiation of an SCA reference
@@ -31,11 +31,11 @@
public interface Reference extends SCAObject {
/**
- * Returns the contract for the reference.
+ * Returns the model for the reference.
*
- * @return the contract for the reference.
+ * @return the model for the reference.
*/
- Contract getServiceContract();
+ CompositeReference getCompositeReference();
/**
* Returns the collection of bindings configured for the reference.
Modified: incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/Service.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/Service.java?view=diff&rev=530208&r1=530207&r2=530208
==============================================================================
--- incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/Service.java (original)
+++ incubator/tuscany/java/sca/modules/core-spi/src/main/java/org/apache/tuscany/spi/component/Service.java Wed Apr 18 16:57:24 2007
@@ -20,7 +20,7 @@
import java.util.List;
-import org.apache.tuscany.assembly.Contract;
+import org.apache.tuscany.assembly.CompositeService;
/**
* The runtime instantiation of an SCA service
@@ -31,11 +31,11 @@
public interface Service extends SCAObject {
/**
- * Returns the contract for the service.
+ * Returns the model for the service.
*
- * @return the contract for the service.
+ * @return the model for the service.
*/
- Contract getServiceContract();
+ CompositeService getCompositeService();
/**
* Returns the collection of bindings configured for the service.
Modified: incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/implementation/composite/ReferenceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/implementation/composite/ReferenceImpl.java?view=diff&rev=530208&r1=530207&r2=530208
==============================================================================
--- incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/implementation/composite/ReferenceImpl.java (original)
+++ incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/implementation/composite/ReferenceImpl.java Wed Apr 18 16:57:24 2007
@@ -23,7 +23,7 @@
import java.util.Collections;
import java.util.List;
-import org.apache.tuscany.assembly.Contract;
+import org.apache.tuscany.assembly.CompositeReference;
import org.apache.tuscany.spi.component.AbstractSCAObject;
import org.apache.tuscany.spi.component.Reference;
import org.apache.tuscany.spi.component.ReferenceBinding;
@@ -34,16 +34,16 @@
* @version $Rev$ $Date$
*/
public class ReferenceImpl extends AbstractSCAObject implements Reference {
- private Contract serviceContract;
+ private CompositeReference compositeReference;
private List<ReferenceBinding> bindings = new ArrayList<ReferenceBinding>();
- public ReferenceImpl(URI name, Contract contract) {
+ public ReferenceImpl(URI name, CompositeReference contract) {
super(name);
- this.serviceContract = contract;
+ this.compositeReference = contract;
}
- public Contract getServiceContract() {
- return serviceContract;
+ public CompositeReference getCompositeReference() {
+ return compositeReference;
}
public List<ReferenceBinding> getReferenceBindings() {
Modified: incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/implementation/composite/ServiceImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/implementation/composite/ServiceImpl.java?view=diff&rev=530208&r1=530207&r2=530208
==============================================================================
--- incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/implementation/composite/ServiceImpl.java (original)
+++ incubator/tuscany/java/sca/modules/core/src/main/java/org/apache/tuscany/core/implementation/composite/ServiceImpl.java Wed Apr 18 16:57:24 2007
@@ -23,7 +23,7 @@
import java.util.Collections;
import java.util.List;
-import org.apache.tuscany.assembly.Contract;
+import org.apache.tuscany.assembly.CompositeService;
import org.apache.tuscany.spi.component.AbstractSCAObject;
import org.apache.tuscany.spi.component.Service;
import org.apache.tuscany.spi.component.ServiceBinding;
@@ -34,22 +34,22 @@
* @version $Rev$ $Date$
*/
public class ServiceImpl extends AbstractSCAObject implements Service {
- private Contract serviceContract;
+ private CompositeService compositeService;
private List<ServiceBinding> bindings = new ArrayList<ServiceBinding>();
private URI targetUri;
- public ServiceImpl(URI name, Contract contract) {
- this(name, contract, null);
+ public ServiceImpl(URI name, CompositeService compositeService) {
+ this(name, compositeService, null);
}
- public ServiceImpl(URI name, Contract contract, URI targetUri) {
+ public ServiceImpl(URI name, CompositeService compositeService, URI targetUri) {
super(name);
- this.serviceContract = contract;
+ this.compositeService = compositeService;
this.targetUri = targetUri;
}
- public Contract getServiceContract() {
- return serviceContract;
+ public CompositeService getCompositeService() {
+ return compositeService;
}
public URI getTargetUri() {
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org