Package org.apache.tuscany.sca.node

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


        System.out.println("3 + 2 = " + result);
        if (result != 5.0){
            throw new SampleLauncherException();
        }
       
        node.stop();
    }
   
}
View Full Code Here


        System.out.println("3 + 2 = " + result);
        if (result != 5.0){
            throw new SampleLauncherException();
        }
       
        node.stop();
    }
   
}
View Full Code Here

   
    public void launchImplementationJavaCalculator(){
        Node node = NodeFactory.newInstance().createNode(new Contribution("c1", "../../learning-more/async/calculator-contribution/target/sample-implementation-java-calculator-async-contribution.jar"));
        node.start();
       
        node.stop();
    }
   
}
View Full Code Here

            System.in.read();
        } catch (IOException e) {
            e.printStackTrace();
        }

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

            final String location = ContributionLocationHelper.getContributionLocation("test.composite");
            final Node node = NodeFactory.newInstance().createNode("test.composite", new Contribution("c1", location));
            node.start();
            // System.out.println("Press any key to stop the node.");
            // System.in.read();
            node.stop();
        } catch (final Exception e) {
            e.printStackTrace();
            Assert.fail();
        }
    }
View Full Code Here

    private void bundleStopping(Bundle bundle) {
        Node node = factory.getNodes().get(bundle);
        if (node == null) {
            return;
        }
        node.stop();
    }

    public void serviceChanged(ServiceEvent event) {
    }
View Full Code Here

    }

    public static void stop(ServletContext servletContext) {
        Node node = (Node) servletContext.getAttribute(ServletHostHelper.SCA_NODE_ATTRIBUTE);
        if (node != null) {
            node.stop();
            servletContext.setAttribute(ServletHostHelper.SCA_NODE_ATTRIBUTE, null);
        }
    }
}
View Full Code Here

        System.out.println("3 + 2 = " + result);
        if (result != 5.0){
            throw new SampleLauncherException();
        }
       
        node.stop();
    }
   
}
View Full Code Here

        Echo echoComponent = node.getService(Echo.class,"EchoComponentWithReference");
        String result = echoComponent.echo("ABC");
        Assert.assertEquals("echo: ABC", result);
        if (node != null) {
            node.stop();
        }
    }

    @Test
    public void testInvokeReferenceVoidOperation() throws Exception {
View Full Code Here

        Echo echoComponent = node.getService(Echo.class,"EchoComponentWithReference");
        echoComponent.echoVoid();

        if (node != null) {
            node.stop();
        }
    }
}
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.