diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/node-api/src')
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(); } |