Package org.apache.tuscany.sca.node

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


        assertEquals(calculator.add(3, 2), 5.0, 0);
        assertEquals(calculator.subtract(3, 2), 1.0, 0);
        assertEquals(calculator.multiply(3, 2), 6.0, 0);
        assertEquals(calculator.divide(3, 2), 1.5, 0);
       
        node.stop();       
    }
}
View Full Code Here


        Properties props = new Properties();
        props.setProperty(RuntimeProperties.QUIET_LOGGING, "true");
        NodeFactory nf = NodeFactory.newInstance(props);
        Node node = nf.createNode();
        node.start();
        node.stop();
       
       
        // This doesn't actually check the logging yet, need to figure out a
        // way to get the log output so for now has to be run manually
        Assert.assertEquals(0 , logRecords.size());
View Full Code Here

    public void testAutoDestroy() throws Exception {
        NodeFactory nf = NodeFactory.newInstance();
        Node node = nf.createNode();
        node.start();
        Assert.assertTrue(((NodeFactoryImpl)nf).inited);
        node.stop();
        Assert.assertFalse(((NodeFactoryImpl)nf).inited);
       
        nf = NodeFactory.newInstance();
        nf.setAutoDestroy(false);
        node = nf.createNode();
View Full Code Here

        nf = NodeFactory.newInstance();
        nf.setAutoDestroy(false);
        node = nf.createNode();
        node.start();
        Assert.assertTrue(((NodeFactoryImpl)nf).inited);
        node.stop();
        Assert.assertTrue(((NodeFactoryImpl)nf).inited);
       
    }
}
View Full Code Here

    }

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

    public static NodeFactory getNodeFactory() {
View Full Code Here

        Node node = NodeFactory.newInstance().createNode("org/apache/tuscany/sca/binding/atom/Consumer.composite",new Contribution("c1", contribution));

        CustomerClient testService = node.getService(CustomerClient.class, "CustomerClient");
        testService.testCustomerCollection();

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

        if (result != 5.0){
            throw new SampleLauncherException();
        }
       
        node1.stop();
        node2.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/implementation-java/calculator-contribution/target/sample-implementation-java-calculator-contribution.jar"));
        node.start();
       
        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

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.