From ce670f8fc119fc342ab628dfaa8ab42f9cf4bb3f Mon Sep 17 00:00:00 2001 From: rfeng Date: Wed, 3 Feb 2010 22:00:39 +0000 Subject: Add domainURI/nodeURI to runtime endpoint/endpoint reference git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@906262 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/tuscany/sca/context/CompositeContext.java | 16 ++++++++++++++-- .../java/org/apache/tuscany/sca/runtime/Invocable.java | 12 ++++++++++++ 2 files changed, 26 insertions(+), 2 deletions(-) (limited to 'sca-java-2.x/trunk/modules/core-spi/src/main') 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 6e3bedc205..6d81a596b3 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 @@ -39,17 +39,21 @@ public class CompositeContext { protected EndpointRegistry endpointRegistry; protected ComponentContextFactory componentContextFactory; protected Composite domainComposite; + protected String nodeURI; + protected String domainURI; - public CompositeContext(ExtensionPointRegistry registry, EndpointRegistry endpointRegistry, Composite domainComposite) { + public CompositeContext(ExtensionPointRegistry registry, EndpointRegistry endpointRegistry, Composite domainComposite, String domainURI, String nodeURI) { this.extensionPointRegistry = registry; this.endpointRegistry = endpointRegistry; ContextFactoryExtensionPoint contextFactories = registry.getExtensionPoint(ContextFactoryExtensionPoint.class); this.componentContextFactory = contextFactories.getFactory(ComponentContextFactory.class); this.domainComposite = domainComposite; + this.domainURI = domainURI; + this.nodeURI = nodeURI; } public CompositeContext(ExtensionPointRegistry registry, EndpointRegistry endpointRegistry) { - this(registry, endpointRegistry, null); + this(registry, endpointRegistry, null, "default", "default"); } /** @@ -124,4 +128,12 @@ public class CompositeContext { public static void removeCompositeContext() { context.remove(); } + + public String getNodeURI() { + return nodeURI; + } + + public String getDomainURI() { + return domainURI; + } } diff --git a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/Invocable.java b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/Invocable.java index 4e0128c49a..a52f478436 100644 --- a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/Invocable.java +++ b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/Invocable.java @@ -55,6 +55,18 @@ public interface Invocable { * @return */ CompositeContext getCompositeContext(); + + + /** + * Get the node URI + * @return The node URI + */ + String getNodeURI(); + /** + * Get the domain URI + * @return The domain URI + */ + String getDomainURI(); /** * Unbind the invocable from the composite context -- cgit v1.2.3