Examples of DomainRegistryFactory


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

     * @return the corresponding EndpointReference from the EndpointRegistry, or null if no match can be found
     */
    private RuntimeEndpointReferenceImpl findActualEPR(RuntimeEndpointReferenceImpl epr,
      ExtensionPointRegistry registry) {
    // Get the EndpointRegistry
        DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(registry);
        if( domainRegistryFactory == null ) return null;
       
        // TODO: For the moment, just use the first (and only!) EndpointRegistry...
        EndpointRegistry endpointRegistry = (EndpointRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0];
        if( endpointRegistry == null ) return null;
       
        for( EndpointReference epReference : endpointRegistry.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

     * 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;
       
        // TODO: For the moment, just use the first (and only!) EndpointRegistry...
        EndpointRegistry endpointRegistry = (EndpointRegistry) domainRegistryFactory.getEndpointRegistries().toArray()[0];
     
      return endpointRegistry;
    } // end method
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

        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

            nodeFactory.init();
           
            ExtensionPointRegistry extensionsRegistry = nodeFactory.getExtensionPointRegistry();
            Properties props = extensionsRegistry.getExtensionPoint(UtilityExtensionPoint.class).getUtility(RuntimeProperties.class).getProperties();
            props.setProperty("client", "true");
            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);
            }
           
            EndpointRegistry endpointRegistry;
            try {
                endpointRegistry = domainRegistryFactory.getEndpointRegistry(registryURI, domainURI);
            } catch (Exception e) {
                throw new NoSuchDomainException(domainURI, e);
            }
           
            FactoryExtensionPoint factories = extensionsRegistry.getExtensionPoint(FactoryExtensionPoint.class);
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 (EndpointRegistry r : domainRegistryFactory.getEndpointRegistries()) {
            if (r instanceof HazelcastEndpointRegistry) {
                hzRegistry = (HazelcastEndpointRegistry)r;
                break;
            }
        }
View Full Code Here

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

        super(domainURI);
       
        this.nodeFactory = (NodeFactoryImpl)NodeFactory.getInstance();
        this.nodeFactory.init();
        this.extensionsRegistry = nodeFactory.getExtensionPointRegistry();
        DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(extensionsRegistry);
       
        String registryURI = getDomainURI().toString();
       
        this.endpointRegistry = domainRegistryFactory.getEndpointRegistry(registryURI, getDomainURI().toString()); // TODO: shouldnt use null for reg uri
       
        // TODO: if there is not an existing endpoint registry for the domain URI the
        //       this should create an endpoint registry client for the remote domain (eg hazelcast native client)
        //       for now just throw an exception
        if (endpointRegistry == null) {
View Full Code Here

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

   
    public List<String> getServiceNames() {
        List<String> serviceNames = new ArrayList<String>();
        if (nodes.size() > 0) {
            ExtensionPointRegistry extensionsRegistry = ((NodeImpl)nodes.values().iterator().next()).getExtensionPointRegistry();
            DomainRegistryFactory domainRegistryFactory = ExtensibleDomainRegistryFactory.getInstance(extensionsRegistry);
            EndpointRegistry endpointRegistry = domainRegistryFactory.getEndpointRegistry(getDomainConfigURI(), getDomainName());
            for (Endpoint endpoint : endpointRegistry.getEndpoints()) {
                // Would be nice if Endpoint.getURI() returned this:
                String name = endpoint.getComponent().getName() + "/" + endpoint.getService().getName();
                if (endpoint.getBinding() != null) {
                    // TODO: shouldn't the binding name be null if its not explicitly specified?
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.