diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/node-impl/src')
3 files changed, 10 insertions, 12 deletions
diff --git a/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java b/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java index 30d61b51bf..e0691ab11b 100644 --- a/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java +++ b/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeFactoryImpl.java @@ -65,7 +65,6 @@ import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.apache.tuscany.sca.core.assembly.RuntimeAssemblyFactory; import org.apache.tuscany.sca.core.invocation.ExtensibleProxyFactory; import org.apache.tuscany.sca.core.invocation.ProxyFactory; -import org.apache.tuscany.sca.core.invocation.ProxyFactoryExtensionPoint; import org.apache.tuscany.sca.deployment.Deployer; import org.apache.tuscany.sca.extensibility.ServiceDiscovery; import org.apache.tuscany.sca.monitor.Monitor; @@ -210,7 +209,7 @@ public class NodeFactoryImpl extends NodeFactory { return attached; } - public ExtensionPointRegistry getExtensionPoints() { + public ExtensionPointRegistry getExtensionPointRegistry() { if (registry == null) { // Create extension point registry registry = createExtensionPointRegistry(); @@ -225,7 +224,7 @@ public class NodeFactoryImpl extends NodeFactory { } long start = currentTimeMillis(); - getExtensionPoints(); + getExtensionPointRegistry(); // Use the runtime-enabled assembly factory FactoryExtensionPoint modelFactories = registry.getExtensionPoint(FactoryExtensionPoint.class); @@ -248,8 +247,7 @@ public class NodeFactoryImpl extends NodeFactory { // Initialize runtime // Get proxy factory - ProxyFactoryExtensionPoint proxyFactories = registry.getExtensionPoint(ProxyFactoryExtensionPoint.class); - proxyFactory = new ExtensibleProxyFactory(proxyFactories); + proxyFactory = ExtensibleProxyFactory.getInstance(registry); utilities.getUtility(WorkScheduler.class); @@ -466,7 +464,7 @@ public class NodeFactoryImpl extends NodeFactory { @Override public void configure(Map<String, Map<String, String>> attributes) { - ServiceDiscovery discovery = getExtensionPoints().getServiceDiscovery(); + ServiceDiscovery discovery = getExtensionPointRegistry().getServiceDiscovery(); for (Map.Entry<String, Map<String, String>> e : attributes.entrySet()) { discovery.setAttribute(e.getKey(), e.getValue()); } diff --git a/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java b/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java index 57cbd200fe..eef9f39009 100644 --- a/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java +++ b/sca-java-2.x/trunk/modules/node-impl/src/main/java/org/apache/tuscany/sca/node/impl/NodeImpl.java @@ -292,8 +292,8 @@ public class NodeImpl implements Node { return configuration; } - public ExtensionPointRegistry getExtensionPoints() { - return manager.getExtensionPoints(); + public ExtensionPointRegistry getExtensionPointRegistry() { + return manager.getExtensionPointRegistry(); } /** @@ -326,7 +326,7 @@ public class NodeImpl implements Node { public String dumpDomainComposite() { StAXArtifactProcessorExtensionPoint xmlProcessors = - getExtensionPoints().getExtensionPoint(StAXArtifactProcessorExtensionPoint.class); + getExtensionPointRegistry().getExtensionPoint(StAXArtifactProcessorExtensionPoint.class); StAXArtifactProcessor<Composite> compositeProcessor = xmlProcessors.getProcessor(Composite.class); @@ -336,7 +336,7 @@ public class NodeImpl implements Node { private String writeComposite(Composite composite, StAXArtifactProcessor<Composite> compositeProcessor){ ByteArrayOutputStream bos = new ByteArrayOutputStream(); XMLOutputFactory outputFactory = - manager.getExtensionPoints().getExtensionPoint(FactoryExtensionPoint.class) + manager.getExtensionPointRegistry().getExtensionPoint(FactoryExtensionPoint.class) .getFactory(XMLOutputFactory.class); try { diff --git a/sca-java-2.x/trunk/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java b/sca-java-2.x/trunk/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java index 56b13b78bb..126340891e 100644 --- a/sca-java-2.x/trunk/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java +++ b/sca-java-2.x/trunk/modules/node-impl/src/test/java/org/apache/tuscany/sca/node/impl/NodeImplTestCase.java @@ -135,11 +135,11 @@ public class NodeImplTestCase { attrs.put(DomainRegistryFactoryExtensionPoint.class.getName(), map2); NodeFactoryImpl factory = (NodeFactoryImpl)NodeFactory.newInstance(attrs); - Assert.assertFalse(factory.getExtensionPoints().getExtensionPoint(ValidationSchemaExtensionPoint.class) + Assert.assertFalse(factory.getExtensionPointRegistry().getExtensionPoint(ValidationSchemaExtensionPoint.class) .isEnabled()); DomainRegistryFactoryExtensionPoint domainRegistryFactoryExtensionPoint = - factory.getExtensionPoints().getExtensionPoint(DomainRegistryFactoryExtensionPoint.class); + factory.getExtensionPointRegistry().getExtensionPoint(DomainRegistryFactoryExtensionPoint.class); Map<String, String> mapping = domainRegistryFactoryExtensionPoint.getDomainRegistryMapping(); Assert.assertEquals(1, mapping.size()); Assert.assertEquals("multicast://200.0.0.100:50000/MyDomain", mapping.get("urn:MyDomain")); |