Package org.apache.tuscany.sca.node

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


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

        String location = ContributionLocationHelper.getContributionLocation("Calculator.composite");
        Node node = NodeFactory.newInstance().createNode("Calculator.composite", new Contribution("c1", location));
        node.start();

        CalculatorService calculatorService =
            node.getService(CalculatorService.class, "CalculatorServiceComponent/CalculatorService");

        // Calculate
View Full Code Here


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

        Node node = NodeFactory.newInstance().createNode();
        node.start();
       
        Hello bpelService = node.getService(Hello.class, "BPELHelloWorldComponent");
       
        String result = bpelService.hello("Hello");
        System.out.println(result);
View Full Code Here

public class CalculatorClient {
    public static void main(String[] args) throws Exception {       
       
      String location = ContributionLocationHelper.getContributionLocation("context/access/ContextAccess.composite");
        Node node = NodeFactory.newInstance().createNode("context/access/ContextAccess.composite", new Contribution("c1", location));
        node.start();
       
        // Code: To access the Spring Application Context instance
        ApplicationContext ctx = SCAApplicationContextProvider.getApplicationContext();
        if (ctx.containsBean("CalculatorServiceBean"))
            System.out.println("CalculatorServiceBean is now available for use...");
View Full Code Here

    public void testWS() throws Exception {

        String location = ContributionLocationHelper.getContributionLocation(TestService.class);
        Contribution contrib = new Contribution("c1", location);
        Node node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/ws/axis2/itests/pojo/test.composite", contrib);
        node.start();

//                try {
//                    System.out.println("Test server started (press enter to shutdown)");
//                    System.in.read();
//                }
View Full Code Here

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

      String location = ContributionLocationHelper.getContributionLocation("spring/annotations/Calculator.composite");
        Node node = NodeFactory.newInstance().createNode("spring/annotations/Calculator.composite", new Contribution("c1", location));
        node.start();       
             
        CalculatorService calculatorService =
            ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
       
        System.out.println("3 + 2=" + calculatorService.add(3, 2));
View Full Code Here

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

        String location = ContributionLocationHelper.getContributionLocation("context/multiple/MultipleContext.composite");
        Node node = NodeFactory.newInstance().createNode("context/multiple/MultipleContext.composite", new Contribution("c1", location));
        node.start();
       
        // Method 1: To access the Spring Application Context instance
        ApplicationContext ctx = SCAApplicationContextProvider.getApplicationContext();
        if (ctx.containsBean("StockQuoteServiceBean"))
            System.out.println("StockQuoteServiceBean is now available for use...");       
View Full Code Here

public class CalculatorClient {
    public static void main(String[] args) throws Exception {       
       
      String location = ContributionLocationHelper.getContributionLocation("context/imports/ContextImports.composite");
        Node node = NodeFactory.newInstance().createNode("context/imports/ContextImports.composite", new Contribution("c1", location));
        node.start();      
             
        CalculatorService calculatorService =
            ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
       
        System.out.println("3 + 2=" + calculatorService.add(3, 2));
View Full Code Here

                .getResource("implementation/policies/CalculatorJass.config").toString());
        }

        String location = ContributionLocationHelper.getContributionLocation("implementation/policies/ImplementationPolicies.composite");
        Node node = NodeFactory.newInstance().createNode("implementation/policies/ImplementationPolicies.composite", new Contribution("c1", location));
        node.start();  
             
        CalculatorService calculatorService =
            ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");

        // Calculate
View Full Code Here

     * @return the running node
     */
    private static Node startRuntime() {
        String location = ContributionLocationHelper.getContributionLocation("scopes.composite");
        Node node = NodeFactory.newInstance().createNode("scopes.composite", new Contribution("c1", location));
        node.start();
        return node;
    }

    /**
     * Stops a Tuscany node.
View Full Code Here

     * @return the running node
     */
    private static Node startRuntime() {
        String location = ContributionLocationHelper.getContributionLocation("CallBackApi.composite");
        Node node = NodeFactory.newInstance().createNode("CallBackApi.composite", new Contribution("c1", location));
        node.start();
        return node;
    }

    /**
     * Stops a Tuscany node.
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.