Package org.apache.tuscany.sca.node

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


       
        System.out.println("Nodes are running, press enter to stop...");
        System.in.read();
       
        for (SCANode runtimeNode: runtimeNodes) {
            runtimeNode.stop();
        }
    }

    private static String print(Composite composite) throws XMLStreamException, ContributionWriteException, ParserConfigurationException, SAXException, IOException {
View Full Code Here


        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));
        System.out.println("3 / 2=" + calculatorService.divide(3, 2));

        node.stop();
    }

}
View Full Code Here

       
        AccountService accountService = ((SCAClient)node).getService(AccountService.class, "AccountServiceComponent");

        System.out.println("Account summary: " + accountService.getAccountReport("Customer_01") );

        node.stop();
   

}
View Full Code Here

    public static void main(String[] args) throws Exception {
        SCANode node = SCANodeFactory.newInstance().createSCANodeFromClassLoader("myapp.composite", MyClientImpl.class.getClassLoader());
        node.start();
        run(node);
        System.out.println("Closing the domain");
        node.stop();
    }

    public static void run(SCANode node) throws InterruptedException {
        MyClient myClient = ((SCAClient)node).getService(MyClient.class, "MyClientComponent");
        myClient.aClientMethod();
View Full Code Here

            System.in.read();
        } else {
            Thread.sleep(timeout);
        }

        node.stop();
       
        System.out.println("Bye");
    }
}
View Full Code Here

                System.in.read();
            } else {
                Thread.sleep(timeout);
            }           

            node.stop();
           
            jmsBroker.stop();
            System.out.println("CheckingsAccount server stopped");
       
        } catch (IOException e) {
View Full Code Here

        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));
        System.out.println("3 / 2=" + calculatorService.divide(3, 2));

        node.stop();
        System.out.println("Bye");
    }

}
View Full Code Here

            MyService service = ((SCAClient)node).getService(MyService.class, "MyServiceComponent");

            Assert.assertEquals("Hello petra", service.sayHello("petra"));

        } finally {
            node.stop();
        }
    }
}
View Full Code Here

            MyService service = ((SCAClient)clientNode).getService(MyService.class, "MyClientComponent");

            Assert.assertEquals("Hi Hello petra", service.sayHello("petra"));

        } finally {
            clientNode.stop();
            serviceNode.stop();
        }
    }
}
View Full Code Here

                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();
    }

    /**
     * Lines 1225, 1226, 1227<br>
     * The "@Destroy" annotation type is used to annotate a Java class method
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.