Package org.apache.tuscany.sca.node

Examples of org.apache.tuscany.sca.node.SCAClient


            node = nodeLauncher.createNode("http://localhost:9990/node-config/NodeA");

            node.start();
           
            // get a reference to the calculator component
            SCAClient client = (SCAClient)node;
            CalculatorService calculatorService =
                client.getService(CalculatorService.class, "CalculatorServiceComponentA");
           
            // Calculate
            System.out.println("3 + 2=" + calculatorService.add(3, 2));
            System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
            System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
View Full Code Here


            nodeC.start();
            nodeB.start();
            nodeA.start();
           
            SCAClient client = (SCAClient)nodeA;
            calculatorService =
                client.getService(CalculatorService.class, "CalculatorServiceComponentA");

        } catch(Exception ex){
            System.err.println(ex.toString());
       
       
View Full Code Here

    }

   
    @Test
    public void testShop() {
        SCAClient client = (SCAClient)storeClientNode;
        Shopper shopper = client.getService(Shopper.class, "StoreClient");
       
        String total = shopper.shop("Orange", 5);
        System.out.println("Total: " + total);
       
        Assert.assertEquals("$17.75", total);
View Full Code Here

            nodeC.start();
            nodeB.start();
            nodeA.start();
           
            SCAClient client = (SCAClient)nodeA;
            calculatorService =
                client.getService(CalculatorService.class, "CalculatorServiceComponentA");

        } catch(Exception ex){
            System.err.println(ex.toString());
       
       
View Full Code Here

            node = nodeLauncher.createNodeFromURL("http://localhost:9990/node-config/NodeA");

            node.start();
           
            // get a reference to the calculator component
            SCAClient client = (SCAClient)node;
            CalculatorService calculatorService =
                client.getService(CalculatorService.class, "CalculatorServiceComponentA");
           
            // Calculate
            System.out.println("3 + 2=" + calculatorService.add(3, 2));
            System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
            System.out.println("3 * 2=" + calculatorService.multiply(3, 2));
View Full Code Here

    public static void main(String[] args) throws Exception {
        NodeLauncher nodeLauncher = NodeLauncher.newInstance();
        SCANode storeClientNode = nodeLauncher.createNodeFromURL("http://localhost:9990/node-config/StoreClientNode");
        storeClientNode.start();
        SCAClient client = (SCAClient)storeClientNode;
       
        Shopper shopper = client.getService(Shopper.class, "StoreClient");
       
        String total = shopper.shop("Orange", 5);
        System.out.println("Total: " + total);
       
        storeClientNode.stop();
View Full Code Here

    }
*/
   
    @Test
    public void testShop() {
        SCAClient client = (SCAClient)storeClientNode;
        Shopper shopper = client.getService(Shopper.class, "StoreClient");
       
        String total = shopper.shop("Orange", 5);
        System.out.println("Total: " + total);
       
        Assert.assertEquals("$17.75", total);
View Full Code Here

            nodeC.start();
            nodeB.start();
            nodeA.start();
           
            SCAClient client = (SCAClient)nodeA;
            calculatorService =
                client.getService(CalculatorService.class, "CalculatorServiceComponentA");

        } catch(Exception ex){
            System.err.println(ex.toString());
       
       
View Full Code Here

        domainManager.stop();
    }
   
    @Test
    public void testShop() {
        SCAClient client = (SCAClient)storeClientNode;
        Shopper shopper = client.getService(Shopper.class, "StoreClient");
       
        String total = shopper.shop("Orange", 5);
        System.out.println("Total: " + total);
       
        Assert.assertEquals("$17.75", total);
View Full Code Here

        node.start();
    }
   
    @Test
    public void testPayment() {
        SCAClient client = (SCAClient) node;
        Payment payment = client.getService(Payment.class, "Payment");
        System.out.println(payment.makePaymentMember("c-0", 100.00f));
    }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.node.SCAClient

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.