Package org.apache.tuscany.sca.node

Examples of org.apache.tuscany.sca.node.SCANode2Factory.createSCANode()


    private SCANode2 node;

    @Override
    protected void setUp() throws Exception {
        SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
        node = nodeFactory.createSCANode(new File("src/main/resources/ServiceNotFoundForComponentService/Calculator.composite").toURL().toString(),
                             new SCAContribution("TestContribution",
                                                 new File("src/main/resources/ServiceNotFoundForComponentService").toURL().toString()));
        node.start();
        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
    }
View Full Code Here


        SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
        SCAContribution[] contributions = new SCAContribution[uris.length];
        for (int i = 0; i < uris.length; i++) {
            contributions[i] = new SCAContribution(uris[i], locations[i]);
        }
        node = new NodeFacade(nodeFactory.createSCANode(compositeURI, contributions));
    }

    /**
     * Bootstrap a new SCA node.
     *
 
View Full Code Here

        SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
        SCAContribution[] contributions = new SCAContribution[uris.length];
        for (int i = 0; i < uris.length; i++) {
            contributions[i] = new SCAContribution(uris[i], locations[i]);
        }
        node = new NodeFacade(nodeFactory.createSCANode(compositeURI, compositeContent, contributions));
    }

    /**
     * Returns the SCA node.
     *
 
View Full Code Here

        try {
            System.out.println("Setting up domain");

           
            SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
            nodeC = nodeFactory.createSCANode(new File("src/main/resources/nodeC/Calculator.composite").toURL().toString(),
                new SCAContribution("NodeC",
                                    new File("src/main/resources/nodeC").toURL().toString()));
            nodeB = nodeFactory.createSCANode(new File("src/main/resources/nodeB/Calculator.composite").toURL().toString(),
                new SCAContribution("NodeB",
                                    new File("src/main/resources/nodeB").toURL().toString()));
View Full Code Here

           
            SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
            nodeC = nodeFactory.createSCANode(new File("src/main/resources/nodeC/Calculator.composite").toURL().toString(),
                new SCAContribution("NodeC",
                                    new File("src/main/resources/nodeC").toURL().toString()));
            nodeB = nodeFactory.createSCANode(new File("src/main/resources/nodeB/Calculator.composite").toURL().toString(),
                new SCAContribution("NodeB",
                                    new File("src/main/resources/nodeB").toURL().toString()));
            nodeA = nodeFactory.createSCANode(new File("src/main/resources/nodeA/Calculator.composite").toURL().toString(),
                new SCAContribution("NodeA",
                                    new File("src/main/resources/nodeA").toURL().toString()));
View Full Code Here

                new SCAContribution("NodeC",
                                    new File("src/main/resources/nodeC").toURL().toString()));
            nodeB = nodeFactory.createSCANode(new File("src/main/resources/nodeB/Calculator.composite").toURL().toString(),
                new SCAContribution("NodeB",
                                    new File("src/main/resources/nodeB").toURL().toString()));
            nodeA = nodeFactory.createSCANode(new File("src/main/resources/nodeA/Calculator.composite").toURL().toString(),
                new SCAContribution("NodeA",
                                    new File("src/main/resources/nodeA").toURL().toString()));

            nodeC.start();
            nodeB.start();
View Full Code Here

        try {
           
            System.out.println("Setting up nodes");
                 
            SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
            nodeA = nodeFactory.createSCANode(new File("src/main/resources/nodeA/CompositeA.composite").toURL().toString(),
                                             new SCAContribution("TestContribution",
                                                                 new File("src/main/resources/nodeA").toURL().toString()));
           
    
            nodeB = nodeFactory.createSCANode(new File("src/main/resources/nodeB/CompositeB.composite").toURL().toString(),
View Full Code Here

            nodeA = nodeFactory.createSCANode(new File("src/main/resources/nodeA/CompositeA.composite").toURL().toString(),
                                             new SCAContribution("TestContribution",
                                                                 new File("src/main/resources/nodeA").toURL().toString()));
           
    
            nodeB = nodeFactory.createSCANode(new File("src/main/resources/nodeB/CompositeB.composite").toURL().toString(),
                                             new SCAContribution("TestContribution",
                                                                 new File("src/main/resources/nodeB").toURL().toString()));
           
           
            nodeA.start();
View Full Code Here

    @Test
    public void testNodeWithCompositeContent() {
        SCANode2Factory factory = SCANode2Factory.newInstance();
        SCAContribution contribution = new SCAContribution("c1", new File("target/test-classes").toURI().toString());
        SCANode2 node = factory.createSCANode("HelloWorld.composite", composite, contribution);
        testNode(node);
    }
   
    @Test
    public void testNodeWithCompositeContentAndNoContribution() {
View Full Code Here

    }
   
    @Test
    public void testNodeWithCompositeContentAndNoContribution() {
        SCANode2Factory factory = SCANode2Factory.newInstance();
        SCANode2 node = factory.createSCANode("HelloWorld.composite", composite);
        testNode(node);
    }   

    @Test
    public void testNodeWithoutCompositeURI() {
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.