diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-06 08:32:38 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2008-10-06 08:32:38 +0000 |
commit | 9fb2fb275d3f69a287ac4f1c7d55190fb7a7bb3b (patch) | |
tree | 40a3b6e43c677e8e9321921b95668eba4c75163a /branches/sca-equinox/modules/host-embedded | |
parent | 4f6fd64d654fec9afb231dd41af9c7d6e41d382f (diff) |
Work in progress. Started to clean up cross-bundle dependencies on ContributionService implementation class, the various CompositeBuilder implementation classes and the ContributionDependencyBuilder implementation class. Added extension points for ContributionBuilders and CompositeBuilders to have them discovered and loaded by the Equinox ServiceDiscovery like other extension points. Moved injection of monitors and SCA definitions to the build methods instead of the constructors to remove references to these implementation constructors. Simplified NodeImpl a bit to remove references to other runtime implementation classes.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@702000 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'branches/sca-equinox/modules/host-embedded')
5 files changed, 13 insertions, 12 deletions
diff --git a/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java b/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java index 1bca290c27..cb1011a5dc 100644 --- a/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java +++ b/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/DefaultSCADomain.java @@ -46,6 +46,7 @@ import org.apache.tuscany.sca.node.SCAContribution; import org.apache.tuscany.sca.node.SCANode; import org.apache.tuscany.sca.node.SCANodeFactory; import org.apache.tuscany.sca.node.impl.NodeImpl; +import org.apache.tuscany.sca.node.impl.NodeUtil; import org.osoa.sca.CallableReference; import org.osoa.sca.ServiceReference; @@ -117,7 +118,7 @@ public class DefaultSCADomain extends SCADomain { if (url == null) { continue; } - String location = NodeImpl.getContributionURL(url, composites[i]).toString(); + String location = NodeUtil.getContributionURL(url, composites[i]).toString(); if (!contributionURLs.contains(location)) { contributionURLs.add(location); } diff --git a/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/EmbeddedSCADomain.java b/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/EmbeddedSCADomain.java index 519e76d0ae..b1e4b13833 100644 --- a/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/EmbeddedSCADomain.java +++ b/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/EmbeddedSCADomain.java @@ -31,8 +31,8 @@ import org.apache.tuscany.sca.assembly.SCABindingFactory; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; import org.apache.tuscany.sca.assembly.xml.Constants; -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; import org.apache.tuscany.sca.contribution.service.ContributionService; +import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.core.assembly.ActivationException; import org.apache.tuscany.sca.core.assembly.CompositeActivator; import org.apache.tuscany.sca.core.context.ServiceReferenceImpl; @@ -154,8 +154,8 @@ public class EmbeddedSCADomain extends SCADomain { composite.getComponents().add(component); RuntimeComponentReference reference = (RuntimeComponentReference)assemblyFactory.createComponentReference(); reference.setName("default"); - ModelFactoryExtensionPoint factories = - runtime.getExtensionPointRegistry().getExtensionPoint(ModelFactoryExtensionPoint.class); + FactoryExtensionPoint factories = + runtime.getExtensionPointRegistry().getExtensionPoint(FactoryExtensionPoint.class); JavaInterfaceFactory javaInterfaceFactory = factories.getFactory(JavaInterfaceFactory.class); InterfaceContract interfaceContract = javaInterfaceFactory.createJavaInterfaceContract(); interfaceContract.setInterface(javaInterfaceFactory.createJavaInterface(businessInterface)); diff --git a/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntime.java b/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntime.java index ae04169933..51b22ffdb0 100644 --- a/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntime.java +++ b/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntime.java @@ -37,7 +37,6 @@ import org.apache.tuscany.sca.assembly.SCABindingFactory; import org.apache.tuscany.sca.assembly.builder.CompositeBuilder; import org.apache.tuscany.sca.assembly.builder.CompositeBuilderException; import org.apache.tuscany.sca.contribution.ContributionFactory; -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessor; import org.apache.tuscany.sca.contribution.processor.URLArtifactProcessorExtensionPoint; import org.apache.tuscany.sca.contribution.resolver.DefaultModelResolver; @@ -45,6 +44,7 @@ import org.apache.tuscany.sca.contribution.resolver.ModelResolver; import org.apache.tuscany.sca.contribution.service.ContributionService; import org.apache.tuscany.sca.core.DefaultExtensionPointRegistry; import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.core.ModuleActivator; import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.apache.tuscany.sca.core.assembly.ActivationException; @@ -115,7 +115,7 @@ public class ReallySmallRuntime { InterfaceContractMapper mapper = utilities.getUtility(InterfaceContractMapper.class); // Get factory extension point - ModelFactoryExtensionPoint factories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class); + FactoryExtensionPoint factories = registry.getExtensionPoint(FactoryExtensionPoint.class); // Get Message factory MessageFactory messageFactory = factories.getFactory(MessageFactory.class); @@ -214,7 +214,7 @@ public class ReallySmallRuntime { public void buildComposite(Composite composite) throws CompositeBuilderException { //Get factory extension point - ModelFactoryExtensionPoint factories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class); + FactoryExtensionPoint factories = registry.getExtensionPoint(FactoryExtensionPoint.class); SCABindingFactory scaBindingFactory = factories.getFactory(SCABindingFactory.class); IntentAttachPointTypeFactory intentAttachPointTypeFactory = factories.getFactory(IntentAttachPointTypeFactory.class); EndpointFactory endpointFactory = factories.getFactory(EndpointFactory.class); diff --git a/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java b/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java index 738e5e6248..9b1ab420c9 100644 --- a/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java +++ b/branches/sca-equinox/modules/host-embedded/src/main/java/org/apache/tuscany/sca/host/embedded/impl/ReallySmallRuntimeBuilder.java @@ -39,7 +39,6 @@ import org.apache.tuscany.sca.assembly.xml.CompositeDocumentProcessor; import org.apache.tuscany.sca.context.ContextFactoryExtensionPoint; import org.apache.tuscany.sca.context.RequestContextFactory; import org.apache.tuscany.sca.contribution.ContributionFactory; -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; import org.apache.tuscany.sca.contribution.processor.DefaultValidatingXMLInputFactory; import org.apache.tuscany.sca.contribution.processor.DefaultValidationSchemaExtensionPoint; import org.apache.tuscany.sca.contribution.processor.ExtensiblePackageProcessor; @@ -61,6 +60,7 @@ import org.apache.tuscany.sca.contribution.service.impl.ContributionRepositoryIm import org.apache.tuscany.sca.contribution.service.impl.ContributionServiceImpl; import org.apache.tuscany.sca.contribution.service.impl.PackageTypeDescriberImpl; import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.apache.tuscany.sca.core.assembly.ActivationException; import org.apache.tuscany.sca.core.assembly.CompositeActivator; @@ -123,7 +123,7 @@ public class ReallySmallRuntimeBuilder { registry.getExtensionPoint(EndpointResolverFactoryExtensionPoint.class); JavaInterfaceFactory javaInterfaceFactory = - registry.getExtensionPoint(ModelFactoryExtensionPoint.class).getFactory(JavaInterfaceFactory.class); + registry.getExtensionPoint(FactoryExtensionPoint.class).getFactory(JavaInterfaceFactory.class); RequestContextFactory requestContextFactory = registry.getExtensionPoint(ContextFactoryExtensionPoint.class).getFactory(RequestContextFactory.class); @@ -179,7 +179,7 @@ public class ReallySmallRuntimeBuilder { throws ActivationException { // Get the model factory extension point - ModelFactoryExtensionPoint modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class); + FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class); // Create a new XML input factory // Allow privileged access to factory. Requires RuntimePermission in security policy file. diff --git a/branches/sca-equinox/modules/host-embedded/src/test/java/org/apache/tuscany/sca/host/embedded/test/extension/module/TestModuleActivator.java b/branches/sca-equinox/modules/host-embedded/src/test/java/org/apache/tuscany/sca/host/embedded/test/extension/module/TestModuleActivator.java index f6f077e99b..e89df5a555 100644 --- a/branches/sca-equinox/modules/host-embedded/src/test/java/org/apache/tuscany/sca/host/embedded/test/extension/module/TestModuleActivator.java +++ b/branches/sca-equinox/modules/host-embedded/src/test/java/org/apache/tuscany/sca/host/embedded/test/extension/module/TestModuleActivator.java @@ -20,9 +20,9 @@ package org.apache.tuscany.sca.host.embedded.test.extension.module; import org.apache.tuscany.sca.assembly.AssemblyFactory; -import org.apache.tuscany.sca.contribution.ModelFactoryExtensionPoint; import org.apache.tuscany.sca.contribution.processor.StAXArtifactProcessorExtensionPoint; import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.core.FactoryExtensionPoint; import org.apache.tuscany.sca.core.ModuleActivator; import org.apache.tuscany.sca.host.embedded.test.extension.DefaultTestImplementationFactory; import org.apache.tuscany.sca.host.embedded.test.extension.TestImplementationFactory; @@ -43,7 +43,7 @@ public class TestModuleActivator implements ModuleActivator { public void start(ExtensionPointRegistry registry) { // Create the test implementation factory - ModelFactoryExtensionPoint modelFactories = registry.getExtensionPoint(ModelFactoryExtensionPoint.class); + FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class); AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class); JavaInterfaceFactory javaFactory = modelFactories.getFactory(JavaInterfaceFactory.class); TestImplementationFactory testFactory = new DefaultTestImplementationFactory(assemblyFactory, javaFactory); |