diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/core-spi/src/main')
-rw-r--r-- | sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ExtensibleDomainRegistryFactory.java (renamed from sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ExtensibleDomainRegistry.java) | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ExtensibleDomainRegistry.java b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ExtensibleDomainRegistryFactory.java index 7b96903dae..91d223bdaf 100644 --- a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ExtensibleDomainRegistry.java +++ b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/ExtensibleDomainRegistryFactory.java @@ -26,21 +26,27 @@ import java.util.Collection; import java.util.List; import org.apache.tuscany.sca.core.ExtensionPointRegistry; +import org.apache.tuscany.sca.core.UtilityExtensionPoint; import org.oasisopen.sca.ServiceRuntimeException; /** - * + * A delegating DomainRegistryFactory */ -public class ExtensibleDomainRegistry implements DomainRegistryFactory { +public class ExtensibleDomainRegistryFactory implements DomainRegistryFactory { private final DomainRegistryFactoryExtensionPoint factories; - public ExtensibleDomainRegistry(ExtensionPointRegistry registry) { + public ExtensibleDomainRegistryFactory(ExtensionPointRegistry registry) { this.factories = registry.getExtensionPoint(DomainRegistryFactoryExtensionPoint.class); } - public ExtensibleDomainRegistry(DomainRegistryFactoryExtensionPoint factories) { + public ExtensibleDomainRegistryFactory(DomainRegistryFactoryExtensionPoint factories) { this.factories = factories; } + + public static ExtensibleDomainRegistryFactory getInstance(ExtensionPointRegistry registry) { + UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class); + return utilities.getUtility(ExtensibleDomainRegistryFactory.class); + } public void addListener(EndpointListener listener) { for (DomainRegistryFactory factory : factories.getDomainRegistryFactories()) { |