Package org.apache.tuscany.sca.node

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


*/
public class CalculatorClient {
    public static void main(String[] args) throws Exception {

        SCANode node = SCANodeFactory.newInstance().createSCANodeFromClassLoader("Calculator.composite", CalculatorClient.class.getClassLoader());
        node.start();
       
        CalculatorService calculatorService =
            ((SCAClient) node).getService(CalculatorService.class, "CalculatorServiceComponent");

        // Calculate
View Full Code Here


                contributions[c] = new org.apache.tuscany.sca.node.launcher.Contribution(dependency.getURI(), dependency.getLocation());
            }
            SCANode runtimeNode = launcher.createNode("http://sample/" + node.getName(), print(runnable), contributions);
           
            // Start the node
            runtimeNode.start();
            runtimeNodes.add(runtimeNode);
        }
       
        System.out.println("Nodes are running, press enter to stop...");
        System.in.read();
View Full Code Here

    public static void main(String[] args) throws Exception {       

        SCANodeFactory factory = SCANodeFactory.newInstance();
        SCANode node = factory.createSCANode(new File("src/main/resources/spring/annotations/Calculator.composite").toURL().toString(),
                new SCAContribution("TestContribution", new File("src/main/resources/spring/annotations/").toURL().toString()));
        node.start();       
             
        CalculatorService calculatorService =
            ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
       
        System.out.println("3 + 2=" + calculatorService.add(3, 2));
View Full Code Here

    @Test
    public void testLaunch() throws Exception {
        NodeLauncher launcher = NodeLauncher.newInstance();
        SCANode node = launcher.createNodeFromClassLoader("HelloWorld.composite", getClass().getClassLoader());
        node.start();

        HelloWorld hw = ((SCAClient)node).getService(HelloWorld.class, "HelloWorld");
        hw.hello("OSGi");

        node.stop();
View Full Code Here

    }

    @Test
    public void testLaunch() throws Exception {
        SCANode node = launcher.createNodeFromClassLoader("HelloWorld.composite", getClass().getClassLoader());
        node.start();
        node.stop();
    }

    @Test
    @Ignore("contribution-osgi issue")
View Full Code Here

            // working directory is "runtest" which means there is no interference
            // other processes.
            SCANode thisNode = SCANodeFactory.newInstance().createSCANodeFromURL("http://localhost:9990/node-config/ClientNode");
            checkDomainErr();
            checkDomainOut();
            thisNode.start();

            // Run the client test code.
            TestService tester = ((SCAClient)thisNode).getService(TestService.class, "MyClientComponent/TestService");
            tester.runTest();
            otherNode.checkNodeErr();
View Full Code Here

    public static void main(String[] args) throws Exception {       

        SCANodeFactory factory = SCANodeFactory.newInstance();
        SCANode node = factory.createSCANode(new File("src/main/resources/imports/wsdl/helloworldws.composite").toURL().toString(),
                new SCAContribution("TestContribution", new File("src/main/resources/imports/wsdl/").toURL().toString()));
        node.start();       
             
        HelloWorldService hwService =
            ((SCAClient)node).getService(HelloWorldService.class, "HelloWorldServiceComponent");
       
        System.out.println("Hello " + hwService.getGreetings("World"));
View Full Code Here

        System.out.println("Starting the Sample SCA StockQuote Service...");

        SCANodeFactory factory = SCANodeFactory.newInstance();
        SCANode node = factory.createSCANode(new File("src/main/resources/context/multiple/StockQuote.composite").toURL().toString(),
                new SCAContribution("TestContribution", new File("src/main/resources/context/multiple/").toURL().toString()));
        node.start();     
       
        System.out.println("Press Enter to Exit...");
        Thread.sleep(1000);

        node.stop();
View Full Code Here

        }

        SCANodeFactory factory = SCANodeFactory.newInstance();
        SCANode node = factory.createSCANode(new File("src/main/resources/implementation/policies/Calculator.composite").toURL().toString(),
                new SCAContribution("TestContribution", new File("src/main/resources/implementation/policies/").toURL().toString()));
        node.start();      
             
        CalculatorService calculatorService =
            ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");

        // Calculate
View Full Code Here

    public static void main(String[] args) throws Exception {       

        SCANodeFactory factory = SCANodeFactory.newInstance();
        SCANode node = factory.createSCANode(new File("src/main/resources/spring/annotations/Calculator.composite").toURL().toString(),
                new SCAContribution("TestContribution", new File("src/main/resources/spring/annotations/").toURL().toString()));
        node.start();       
             
        CalculatorService calculatorService =
            ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
       
        System.out.println("3 + 2=" + calculatorService.add(3, 2));
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.