Examples of DomainRegistryFactory


Examples of org.apache.tuscany.sca.runtime.DomainRegistryFactory

        nodeFactory.init();
        nodeFactory.addNode(configuration, this);
        this.proxyFactory = nodeFactory.proxyFactory;
       
        DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(nodeFactory.registry);
        EndpointRegistry endpointRegistry =
            domainRegistryFactory.getEndpointRegistry(configuration.getDomainRegistryURI(), configuration
                .getDomainURI());
       
        UtilityExtensionPoint utilities = nodeFactory.registry.getExtensionPoint(UtilityExtensionPoint.class);
        this.compositeActivator = utilities.getUtility(CompositeActivator.class);
        try {
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.DomainRegistryFactory

        }
    }
   
    public void start() {
        init();
        DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(registry);
        domainRegistryFactory.getEndpointRegistry(properties.getProperty("reguri"), properties.getProperty("defaultDomainName"));
    }
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.DomainRegistryFactory

    // runtime start. Not in use at the moment as we are getting away with
    // runtime matching. Leaving here for when we come to sorting out
    // autowire which still relies on matching in the builder
    private void postBuildEndpointReferenceMatching(Composite composite){
        EndpointReferenceBinder endpointReferenceBinder = registry.getExtensionPoint(EndpointReferenceBinder.class);
        DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(registry);
       
        // create temporary local registry for all available local endpoints
        // TODO - need a better way of getting a local registry
        EndpointRegistry registry = domainRegistryFactory.getEndpointRegistry("vm://tmp", "local");
       
        // populate the registry with all the endpoints that are currently present in the model
        populateLocalRegistry(composite, registry);
       
        // look at all the endpoint references and try to match them to
        // any local endpoints
        for (EndpointReference endpointReference : registry.getEndpointReferences()){
            endpointReferenceBinder.bindBuildTime(registry, endpointReference);
        }
       
        // remove the local registry
        domainRegistryFactory.getEndpointRegistries().remove(registry);
    }
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.DomainRegistryFactory

    MessageFactory messageFactory;

    public ReferenceInvoker(ExtensionPointRegistry extensionsRegistry, String serviceURI, Operation operation) {
        this.serviceURI = serviceURI;
        this.operation = operation;
        DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(extensionsRegistry);
        for (DomainRegistry r : domainRegistryFactory.getEndpointRegistries()) {
            if (r instanceof HazelcastDomainRegistry) {
                hzRegistry = (HazelcastDomainRegistry)r;
                break;
            }
        }
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.DomainRegistryFactory

     * @return the corresponding EndpointReference from the DomainRegistry, or null if no match can be found
     */
    private RuntimeEndpointReferenceImpl findActualEPR(RuntimeEndpointReferenceImpl epr,
      ExtensionPointRegistry registry) {
    // Get the DomainRegistry
        DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(registry);
        if( domainRegistryFactory == null ) return null;
       
        // TODO: For the moment, just use the first (and only!) DomainRegistry...
        DomainRegistry domainRegistry = (DomainRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0];
        if( domainRegistry == null ) return null;
       
        for( EndpointReference epReference : domainRegistry.getEndpointReferences() ) {
          // TODO: For the present, simply return the first matching endpointReference
          if( epReference.getURI().equals(epr.getURI()) ) {
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.DomainRegistryFactory

       
        return extensionsRegistry;
    }

    public static DomainRegistry getClientEndpointRegistry(ExtensionPointRegistry extensionsRegistry, String domainURI) throws NoSuchDomainException {
        DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(extensionsRegistry);
       
        String registryURI = domainURI;

        // TODO: theres better ways to do this but this gets things working for now
        if (registryURI.indexOf(":") == -1) {
            registryURI = "tuscanyclient:" + registryURI;
        }
        if (registryURI.startsWith("uri:")) {
            registryURI = "tuscanyclient:" + registryURI.substring(4);
        }
        if (registryURI.startsWith("tuscany:")) {
            registryURI = "tuscanyclient:" + registryURI.substring(8);
        }

        try {
            return domainRegistryFactory.getEndpointRegistry(registryURI, domainURI);
        } catch (Exception e) {
            throw new NoSuchDomainException(domainURI, e);
        }
    }
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.DomainRegistryFactory

            // Set up the node context
            UtilityExtensionPoint utilities = nodeFactory.registry.getExtensionPoint(UtilityExtensionPoint.class);
            this.compositeActivator = utilities.getUtility(CompositeActivator.class);

            DomainRegistryFactory domainRegistryFactory =
                ExtensibleDomainRegistryFactory.getInstance(nodeFactory.registry);
            DomainRegistry domainRegistry =
                domainRegistryFactory.getEndpointRegistry(configuration.getDomainRegistryURI(),
                                                          configuration.getDomainURI());

            this.compositeContext =
                new CompositeContext(nodeFactory.registry, domainRegistry, domainComposite,
                                     configuration.getDomainURI(), configuration.getURI(), nodeFactory
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.DomainRegistryFactory

        }
    }
   
    public void start() {
        init();
        DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(registry);
        domainRegistryFactory.getEndpointRegistry(properties.getProperty("reguri"), properties.getProperty("defaultDomainName"));
    }
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.DomainRegistryFactory

     * Get the DomainRegistry
     * @param registry - the ExtensionPoint registry
     * @return the DomainRegistry - will be null if the DomainRegistry cannot be found
     */
    private DomainRegistry getEndpointRegistry( ExtensionPointRegistry registry) {
        DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(registry);
       
        if( domainRegistryFactory == null ) return null;
       
        // TODO: For the moment, just use the first (and only!) DomainRegistry...
        DomainRegistry domainRegistry = (DomainRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0];
     
      return domainRegistry;
    } // end method
View Full Code Here

Examples of org.apache.tuscany.sca.runtime.DomainRegistryFactory

     * Get the EndpointRegistry
     * @param registry - the ExtensionPoint registry
     * @return the EndpointRegistry - will be null if the EndpointRegistry cannot be found
     */
    private EndpointRegistry getEndpointRegistry( ExtensionPointRegistry registry) {
        DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(registry);
       
        if( domainRegistryFactory == null ) return null;
       
        // Find the first endpoint registry that matches the domain name
        if( domainURI != null ) {
          for( EndpointRegistry endpointRegistry : domainRegistryFactory.getEndpointRegistries() ) {
            if( domainURI.equals( endpointRegistry.getDomainURI() ) ) return endpointRegistry;
          } // end for
        } // end if
       
        // if there was no domainName to match, simply return the first EndpointRegistry...
        EndpointRegistry endpointRegistry = (EndpointRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0];
       
     
      return endpointRegistry;
    } // end method
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.