Package org.apache.tuscany.sca.node

Examples of org.apache.tuscany.sca.node.SCANode.start()


            URL contribution = SCAContributionUtil.findContributionFromResource(classLoader, compositeFile);
            node.addContribution(compositeFile, contribution);
           
            node.addToDomainLevelComposite(compositeFile);
           
            node.start();
           
        } catch (Exception e) {
            System.err.println("Exception starting node");
            e.printStackTrace();
            System.exit(0);
View Full Code Here


            node = nodeFactory.createSCANode("http://localhost:8200/node", null);
            node.addContribution("nodeB", cl.getResource("nodeB/"));
            node.addContribution("nodeC", cl.getResource("nodeC/"));
            node.addToDomainLevelComposite(new QName("http://sample", "CalculatorB"));
            node.addToDomainLevelComposite(new QName("http://sample", "CalculatorC"));
            node.start();  
           
            calculatorServiceB = node.getDomain().getService(CalculatorService.class, "CalculatorServiceComponentB");
            subtractServiceC = node.getDomain().getService(SubtractService.class, "SubtractServiceComponentC");
           
            for(int j=0; j < 20; j++){
View Full Code Here

        logger.info("added contribution: " + contributionURL);
       
        if (started) {
            if (domainName == null) {
                scaNode.addToDomainLevelComposite((QName)null);
                scaNode.start();
            } else {
                scaNode.addToDomainLevelComposite((QName)null);
                scaNode.start();
            }
        }
View Full Code Here

            if (domainName == null) {
                scaNode.addToDomainLevelComposite((QName)null);
                scaNode.start();
            } else {
                scaNode.addToDomainLevelComposite((QName)null);
                scaNode.start();
            }
        }
    }

    public void start() {
View Full Code Here

    @Before
    public void setUp() throws Exception {
        SCANode node = SCANodeFactory.newInstance().createSCANode(null, null);
        node.addContribution("mycontribution",
                             OneWayTestCaseFIXME.class.getResource("/OneWayContribution/."));
        node.start();
        domain = node.getDomain();
    }

    @After
    public void tearDown() throws Exception {
View Full Code Here

    public void atDestroyProper() throws Exception {
        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
        SCANode node = nodeFactory.createSCANode(new File("src/main/resources/proper/AService.composite").toURL().toString(),
                new SCAContribution("TestContribution",
                                    new File("src/main/resources/proper").toURL().toString()));
        node.start();
        AService aService = ((SCAClient)node).getService(AService.class, "AComponent");
        Assert.assertEquals("Hello Pandu", aService.getGreetings("Pandu"));
        node.stop();
    }
View Full Code Here

    public void atInitProper() throws Exception {
        SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
        SCANode node = nodeFactory.createSCANode(new File("src/main/resources/proper/AService.composite").toURL().toString(),
                new SCAContribution("TestContribution",
                                    new File("src/main/resources/proper").toURL().toString()));
        node.start();
        AService aService = ((SCAClient)node).getService(AService.class, "AComponent");
        Assert.assertTrue(aService.isInitProper());
        Assert.assertEquals("Hello Pandu", aService.getGreetings("Pandu"));
        node.stop();
    }
View Full Code Here

        SCANode node =
            SCANodeFactory.newInstance().createSCANode("currency-converter-jms.composite",
                                                       currencyContribution,
                                                       currencyJMSContribution);
        node.start();

        System.out.println("Node started - Press enter to shutdown.");
        System.in.read();

        node.stop();
View Full Code Here

                                                                   locate("databinding-client"));

        SCANode node2 = SCANodeFactory.newInstance().createSCANode(null, locate("creditcard-payment-sdo"));

        node1.start();
        node2.start();

        Runnable runner = ((SCAClient)node1).getService(Runnable.class, "TestClient/Runnable");
        runner.run();

        node1.stop();
View Full Code Here

        SCAContribution gvtContribution = new SCAContribution("introducing-trips",
            "../../contributions/introducing-trips/target/classes");

        SCANode node = SCANodeFactory.newInstance().createSCANode("trips.composite", gvtContribution);

        node.start();

        Trips tripProvider = ((SCAClient)node).getService(Trips.class, "TripProvider/Trips");

        System.out.println("Trip boooking code = " + tripProvider.checkAvailability("FS1APR4", 1));
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.