Package org.apache.tuscany.sca.node

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


       
        String [] contributions = {"./target/classes"};
        Node node1 = NodeFactory.newInstance().createNode(URI.create("tuscany:InerfaceMissmatchTestCase"),
                                                                     "org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchDistributedClient.composite",
                                                                     contributions);
        node1.start();

        Node node2 = NodeFactory.newInstance().createNode(URI.create("tuscany:InerfaceMissmatchTestCase"),
                                                                     "org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchCallbackDistributedService.composite",
                                                                     contributions);
        // for default binding on node2 to use a different port from node 1(which will default to 8080
View Full Code Here


                                                                     "org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchCallbackDistributedService.composite",
                                                                     contributions);
        // for default binding on node2 to use a different port from node 1(which will default to 8080
        ((NodeImpl)node2).getConfiguration().addBinding(WebServiceBinding.TYPE, "http://localhost:8081/");
        ((NodeImpl)node2).getConfiguration().addBinding(SCABinding.TYPE, "http://localhost:8081/");       
        node2.start();
       
        ClientComponent local = node1.getService(ClientComponent.class, "DistributedClientComponent");
        ParameterObject po = new ParameterObject();
       
        try {
View Full Code Here

       
        String [] contributions = {"./target/classes"};
        Node node1 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
                                                                     "org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchPolicyDistributedClient.composite",
                                                                     contributions);
        node1.start();

        Node node2 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
                                                                     "org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchPolicyDistributedService.composite",
                                                                     contributions);
        // force binding.ws on node2 to use a different port from node 1(which will default to 8080
View Full Code Here

        Node node2 = NodeFactory.newInstance().createNode(URI.create("uri:default"),
                                                                     "org/apache/tuscany/sca/itest/interfaces/missmatch/distributed/MissmatchPolicyDistributedService.composite",
                                                                     contributions);
        // force binding.ws on node2 to use a different port from node 1(which will default to 8080
        ((NodeImpl)node2).getConfiguration().addBinding(WebServiceBinding.TYPE, "http://localhost:8081/");
        node2.start();
       
        ClientComponent local = node1.getService(ClientComponent.class, "DistributedClientComponent");
        ParameterObject po = new ParameterObject();
       
        try {
View Full Code Here

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

        Node node = NodeFactory.newInstance().createNode();

        node.start();
       
        CalculatorService calculatorService = ((Client)node).getService(CalculatorService.class, "CalculatorServiceComponent");
       
        // Calculate
        System.out.println("3 + 2=" + calculatorService.add(3, 2));
View Full Code Here

*/
public class SampleClientImpl {
    public static void main(String[] args) throws Exception {
        Node node = NodeFactory.newInstance().createNode();
       
        node.start();

        SampleClient sampleClient = node.getService(SampleClient.class, "SampleClient");
        sampleClient.runSample();
       
        node.stop();
View Full Code Here

    public static void main(String[] args) throws Exception {
        System.out.println("Starting of the SCA Calculator Application exposed as RMI Services...");
        String uri = ContributionLocationHelper.getContributionLocation("CalculatorRMIServer.composite");
        Contribution contribution = new Contribution("c1", uri);
        Node node = NodeFactory.newInstance().createNode("CalculatorRMIServer.composite", contribution);
        node.start();
        System.out.println("... Press Enter to Exit...");
        System.in.read();
        node.stop();
        System.out.println("Exited...");
        System.exit(0);
View Full Code Here

public class CalculatorClient {
    public static void main(String[] args) throws Exception {
        String uri = ContributionLocationHelper.getContributionLocation("CalculatorRMIReference.composite");
        Contribution contribution = new Contribution("c1", uri);
        Node node = NodeFactory.newInstance().createNode("CalculatorRMIReference.composite", contribution);
        node.start();
        CalculatorService calculatorService = node.getService(CalculatorService.class, "CalculatorServiceComponent");

        // Calculate
        System.out.println("3 + 2=" + calculatorService.add(3, 2));
        System.out.println("3 - 2=" + calculatorService.subtract(3, 2));
View Full Code Here

            return;
        }
        try {
            NodeConfiguration configuration = factory.getConfiguration(bundle, null);
            Node node = factory.createNode(configuration);
            node.start();
        } catch (Throwable e) {
            logger.log(Level.SEVERE, e.getMessage(), e);
        }
    }
View Full Code Here

    @Test
    public void testLaunch() throws Exception {
        String location = ContributionLocationHelper.getContributionLocation(getClass());
        Node node = launcher.createNode("HelloWorld.composite", new Contribution("test",  location));
        node.start();
        node.stop();
    }

    @Test
    @Ignore("contribution-osgi issue")
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.