summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules/node-api/src/main/java
diff options
context:
space:
mode:
authorrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2011-09-19 22:55:37 +0000
committerrfeng <rfeng@13f79535-47bb-0310-9956-ffa450edef68>2011-09-19 22:55:37 +0000
commit9bd25321d03e2577f115597742f4c2c48ddcd9cc (patch)
tree492da9d9f7466bfe6082b5dc29d1bed57608debd /sca-java-2.x/trunk/modules/node-api/src/main/java
parenteca8de9ef142245d65c69b97d10167849f9d56dd (diff)
Add the ablity to load the contributions/composite for a given node configuration without starting the node
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1172881 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules/node-api/src/main/java')
-rw-r--r--sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java25
-rw-r--r--sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/extensibility/NodeExtension.java26
2 files changed, 47 insertions, 4 deletions
diff --git a/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java b/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java
index 0965f9bc79..0aa01a477d 100644
--- a/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java
+++ b/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/NodeFactory.java
@@ -39,9 +39,11 @@ import java.util.List;
import java.util.Map;
import java.util.Properties;
+import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.node.configuration.DefaultNodeConfigurationFactory;
import org.apache.tuscany.sca.node.configuration.NodeConfiguration;
import org.apache.tuscany.sca.node.configuration.NodeConfigurationFactory;
+import org.apache.tuscany.sca.node.extensibility.NodeExtension;
import org.oasisopen.sca.ServiceReference;
import org.oasisopen.sca.ServiceRuntimeException;
@@ -633,10 +635,27 @@ public abstract class NodeFactory extends DefaultNodeConfigurationFactory {
*/
public abstract NodeConfiguration loadConfiguration(InputStream xml, URL base);
- public abstract <T> T getExtensionPointRegistry();
+ /**
+ * Get the ExtensionPointRegistry
+ * @return
+ */
+ public abstract ExtensionPointRegistry getExtensionPointRegistry();
+ /**
+ * Initialize the factory
+ */
public abstract void init();
- public void setAutoDestroy(boolean b) {
- }
+ /**
+ * Set auto destroy flag when all nodes are stopped
+ * @param b
+ */
+ public abstract void setAutoDestroy(boolean b);
+
+ /**
+ * Create and load the node for the purpose of metadata introspection
+ * @param configuration
+ * @return The extended Node
+ */
+ public abstract NodeExtension loadNode(NodeConfiguration configuration);
}
diff --git a/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/extensibility/NodeExtension.java b/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/extensibility/NodeExtension.java
index 80c304b078..6a436e7fa3 100644
--- a/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/extensibility/NodeExtension.java
+++ b/sca-java-2.x/trunk/modules/node-api/src/main/java/org/apache/tuscany/sca/node/extensibility/NodeExtension.java
@@ -24,15 +24,39 @@ import org.apache.tuscany.sca.core.ExtensionPointRegistry;
import org.apache.tuscany.sca.node.Node;
import org.apache.tuscany.sca.node.configuration.NodeConfiguration;
+/**
+ * An extended Node interface to provide more metadata for Tuscany extensions
+ * @version $Rev $Date$
+ * @tuscany.spi.extension.asclient
+ */
public interface NodeExtension extends Node {
+ /**
+ * Get the node URI
+ * @return The Tuscany node URI
+ */
String getURI();
+ /**
+ * Get the domain URI
+ * @return The SCA domain URI
+ */
String getDomainURI();
+ /**
+ * Get the node configuration
+ * @return The node cofiguration
+ */
NodeConfiguration getConfiguration();
+ /**
+ * Get the domain composite
+ * @return The domain composite
+ */
Composite getDomainComposite();
-
+
+ /**
+ * Get the extension point registry
+ */
ExtensionPointRegistry getExtensionPointRegistry();
}