summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/core-spi/src/main/java
diff options
context:
space:
mode:
authorslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-04-08 12:21:20 +0000
committerslaws <slaws@13f79535-47bb-0310-9956-ffa450edef68>2010-04-08 12:21:20 +0000
commit3571fa366df88a6bfba3e4ec972f5ec6e7bdd1da (patch)
tree1546b927f11e68b7f2858fc2abd6b21832d61e06 /sca-java-2.x/trunk/modules/core-spi/src/main/java
parent4e89e387d15e50c28855127bcbbd18fb9629c78d (diff)
TUSCANY-3529 - update binding matching to turn on code that looks at binding type provided intents
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@931904 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/core-spi/src/main/java')
-rw-r--r--sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/CompositeContext.java17
-rw-r--r--sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeEndpoint.java8
2 files changed, 23 insertions, 2 deletions
diff --git a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/CompositeContext.java b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/CompositeContext.java
index 6d81a596b3..23a50e5f22 100644
--- a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/CompositeContext.java
+++ b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/context/CompositeContext.java
@@ -23,6 +23,7 @@ import org.apache.tuscany.sca.assembly.Composite;
import org.apache.tuscany.sca.assembly.Endpoint;
import org.apache.tuscany.sca.assembly.EndpointReference;
import org.apache.tuscany.sca.core.ExtensionPointRegistry;
+import org.apache.tuscany.sca.definitions.Definitions;
import org.apache.tuscany.sca.invocation.Message;
import org.apache.tuscany.sca.runtime.EndpointRegistry;
import org.apache.tuscany.sca.runtime.RuntimeComponent;
@@ -41,8 +42,9 @@ public class CompositeContext {
protected Composite domainComposite;
protected String nodeURI;
protected String domainURI;
+ protected Definitions systemDefinitions;
- public CompositeContext(ExtensionPointRegistry registry, EndpointRegistry endpointRegistry, Composite domainComposite, String domainURI, String nodeURI) {
+ public CompositeContext(ExtensionPointRegistry registry, EndpointRegistry endpointRegistry, Composite domainComposite, String domainURI, String nodeURI, Definitions systemDefinitions) {
this.extensionPointRegistry = registry;
this.endpointRegistry = endpointRegistry;
ContextFactoryExtensionPoint contextFactories = registry.getExtensionPoint(ContextFactoryExtensionPoint.class);
@@ -50,10 +52,11 @@ public class CompositeContext {
this.domainComposite = domainComposite;
this.domainURI = domainURI;
this.nodeURI = nodeURI;
+ this.systemDefinitions = systemDefinitions;
}
public CompositeContext(ExtensionPointRegistry registry, EndpointRegistry endpointRegistry) {
- this(registry, endpointRegistry, null, "default", "default");
+ this(registry, endpointRegistry, null, "default", "default", null);
}
/**
@@ -136,4 +139,14 @@ public class CompositeContext {
public String getDomainURI() {
return domainURI;
}
+
+ /**
+ * The system definitions that result from starting the runtime.
+ * TODO - these can be null when the SCAClient starts the runtime
+ *
+ * @return systemDefinitions
+ */
+ public Definitions getSystemDefinitions() {
+ return systemDefinitions;
+ }
}
diff --git a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeEndpoint.java b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeEndpoint.java
index 178f184c1f..97a849f14c 100644
--- a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeEndpoint.java
+++ b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/RuntimeEndpoint.java
@@ -22,6 +22,7 @@ package org.apache.tuscany.sca.runtime;
import java.io.Serializable;
import org.apache.tuscany.sca.assembly.Endpoint;
+import org.apache.tuscany.sca.context.CompositeContext;
import org.apache.tuscany.sca.interfacedef.InterfaceContract;
import org.apache.tuscany.sca.provider.ServiceBindingProvider;
@@ -55,4 +56,11 @@ public interface RuntimeEndpoint extends Endpoint, Invocable, Serializable {
* @return The target component type service interface contract
*/
InterfaceContract getComponentTypeServiceInterfaceContract();
+
+ /**
+ * Get the composite context for the composite that contains this endpoint. This
+ * is useful for accessing various composite level objects from within the
+ * runtime code
+ */
+ CompositeContext getCompositeContext();
}