Package org.apache.tuscany.sca.distributed.node.impl

Examples of org.apache.tuscany.sca.distributed.node.impl.EmbeddedNode


        // Create the distributed domain representation
        distributedDomain = new DistributedSCADomainMemoryImpl(DEFULT_DOMAIN_NAME);
       
        // create the node that runs the
        // calculator component
        nodeA = new EmbeddedNode("nodeA");
        domainA = nodeA.attachDomain(distributedDomain);
        contributionURL = Thread.currentThread().getContextClassLoader().getResource("nodeA/");
        nodeA.addContribution(DEFULT_DOMAIN_NAME, contributionURL);

        // create the node that runs the
        // add component
        nodeB = new EmbeddedNode("nodeB");
        domainB = nodeB.attachDomain(distributedDomain);
        contributionURL = Thread.currentThread().getContextClassLoader().getResource("nodeB/");
        nodeB.addContribution(DEFULT_DOMAIN_NAME, contributionURL);        
        // create the node that runs the
        // subtract component     
        nodeC = new EmbeddedNode("nodeC");
        domainC = nodeC.attachDomain(distributedDomain);
        contributionURL = Thread.currentThread().getContextClassLoader().getResource("nodeC/");
        nodeC.addContribution(DEFULT_DOMAIN_NAME, contributionURL)
    
       
View Full Code Here


            // here so that the node contacts a registry running somewhere out on the
            // network.
            DistributedSCADomain distributedDomain = new DistributedSCADomainNetworkImpl(domainName);
      
            // create the node that runs the calculator component
            EmbeddedNode node = new EmbeddedNode(nodeName);
            SCADomain domain = node.attachDomain(distributedDomain);
               
            // the application components are added. The null here just gets the node
            // implementation to read a directory from the classpath with the node name
            // TODO - should be done as a management action.      
            node.addContribution(domainName, null)
           
            // start the node
            // TODO - should be done as a management action.
            node.start();
                   
            // nodeA is the head node and runs some tests while all other nodes
            // simply listen for incoming messages
            if ( nodeName.equals("nodeA") ) {           
                // do some application stuff
View Full Code Here

        // Create the distributed domain representation
        distributedDomain = new DistributedSCADomainMemoryImpl(DEFULT_DOMAIN_NAME);
       
        // create the node that runs the
        // calculator component
        nodeA = new EmbeddedNode("nodeA");
        domainA = nodeA.attachDomain(distributedDomain);
        nodeA.addContribution(DEFULT_DOMAIN_NAME, null);

        // create the node that runs the
        // add component
        nodeB = new EmbeddedNode("nodeB");
        domainB = nodeB.attachDomain(distributedDomain);
        nodeB.addContribution(DEFULT_DOMAIN_NAME, null);        
        // create the node that runs the
        // subtract component     
        nodeC = new EmbeddedNode("nodeC");
        nodeC.attachDomain(distributedDomain);
        nodeC.addContribution(DEFULT_DOMAIN_NAME, null)
    
       
        // start all of the nodes
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.distributed.node.impl.EmbeddedNode

Copyright © 2018 www.massapicom. 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.