Package org.apache.tuscany.sca.node

Examples of org.apache.tuscany.sca.node.NodeFactory


     * Runs once before running the tests
     */
    @BeforeClass
    public static void setUp() throws Exception {
        try {
        NodeFactory factory = NodeFactory.newInstance();
        node = factory.createNode(new File("src/main/resources/wsdl/wrapped/helloservice.composite").toURI().toURL().toString(),
                new Contribution("TestContribution", new File("src/main/resources/wsdl/wrapped/").toURI().toURL().toString()));
        node.start();
        }catch(Throwable e) {
            e.printStackTrace();
        }
View Full Code Here


*  For testing purpose
*/
public class ComposerServer {

    public final static void main(String[] args) throws Exception {
      NodeFactory factory = NodeFactory.newInstance();
        Node node = factory.createNode(new File("src/main/resources/Outer.composite").toURI().toURL().toString(),
                new Contribution("TestContribution", new File("src/main/resources/").toURI().toURL().toString()));
        node.start();
        System.out.println("Press Enter to exit...");
        System.in.read();
        node.stop();
View Full Code Here

    private CallBackBasicClient aCallBackClient;

    @Before
    public void setUp() throws Exception {
        try {        
            NodeFactory factory = NodeFactory.getInstance();
           
            NodeConfiguration configuration = factory.createNodeConfiguration();
            configuration.setDomainURI("tuscany:default");
            configuration.setURI("node1");
            configuration.addContribution("c1", "./target/classes");
            configuration.addDeploymentComposite("c1","CallBackService.composite");

            //node1 = factory.createNode("CallBackService.composite", new Contribution("c1", "./target/classes"));
            node1 = factory.createNode(configuration);
            node1.start();
           
            configuration = factory.createNodeConfiguration();
            configuration.setDomainURI("tuscany:default");
            configuration.setURI("node2");
            configuration.addContribution("c1", "./target/classes");
            configuration.addDeploymentComposite("c1","CallBackReference.composite");
           
            //node2 = factory.newInstance().createNode("CallBackReference.composite", new Contribution("c1", "./target/classes"));
            node2 = factory.createNode(configuration);
            node2.start();
   
            aCallBackClient = node2.getService(CallBackBasicClient.class, "CallBackBasicClient");
        } catch (Exception ex){
            ex.printStackTrace();
View Full Code Here

*  For testing purpose
*/
public class ComposerClient {

    public final static void main(String[] args) throws Exception {
      NodeFactory factory = NodeFactory.newInstance();
        Node node = factory.createNode(new File("src/main/resources/Client.composite").toURI().toURL().toString(),
                new Contribution("TestContribution", new File("src/main/resources/").toURI().toURL().toString()));
        node.start();
        Composer composer = node.getService(Composer.class, "ClientComponent/Composer");
        System.out.println(composer.Compose("ABC"));
        node.stop();
View Full Code Here

    private String[] contributionNames = new String[] { "Async_001" };
   
    @Before
    public void setUp() throws Exception {
     
      final NodeFactory nf = NodeFactory.newInstance();
        String here = ASM_0002_Client.class.getProtectionDomain().getCodeSource().getLocation().toString();
        // Create the node using the pattern "name of composite file to start" / Contribution to use
        node = nf.createNode(this.composite, new Contribution("test", here));
       
        node.start();
    }
View Full Code Here

     * Runs before each test method
     */
    @BeforeClass
    public static void setUp() throws Exception {
        try {
      NodeFactory factory = NodeFactory.newInstance();
            node = factory.createNode(new File("src/main/resources/generics-service.composite").toURI().toURL().toString(),
                new Contribution("TestContribution", new File("src/main/resources/").toURI().toURL().toString()));
            node.start();
        } catch(Throwable e) {
            e.printStackTrace();
        }
View Full Code Here

     * Runs once before running the tests
     */
    @BeforeClass
    public static void setUp() throws Exception {
        try {
            NodeFactory factory = NodeFactory.newInstance();
            node = factory.createNode(new File("src/main/resources/doclitbarewsdl.composite").toURI().toURL().toString(),
                new Contribution("TestContribution", new File("src/main/resources/").toURI().toURL().toString()));
            node.start();
        } catch (Throwable e) {
            // @Ignore("TUSCANY-2398")
            e.printStackTrace();
View Full Code Here

    private String composite      = "Test_Async_003.composite";
   
    @Before
    public void setUp() throws Exception {
     
      final NodeFactory nf = NodeFactory.newInstance();
        String here = ASM_0002_Client.class.getProtectionDomain().getCodeSource().getLocation().toString();
        // Create the node using the pattern "name of composite file to start" / Contribution to use
        node = nf.createNode(this.composite, new Contribution("test", here));
       
        node.start();
    }
View Full Code Here

    private String composite      = "Test_Async_002.composite";
   
    @Before
    public void setUp() throws Exception {
     
      final NodeFactory nf = NodeFactory.newInstance();
        String here = ASM_0002_Client.class.getProtectionDomain().getCodeSource().getLocation().toString();
        // Create the node using the pattern "name of composite file to start" / Contribution to use
        node = nf.createNode(this.composite, new Contribution("test", here));
       
        node.start();
    }
View Full Code Here

     * Runs once before running the tests
     */
    @BeforeClass
    public static void setUp() throws Exception {
        try {
            NodeFactory factory = NodeFactory.newInstance();
            node = factory.createNode(new File("src/main/resources/helloservice.composite").toURI().toURL().toString(),
                new Contribution("TestContribution", new File("src/main/resources/").toURI().toURL().toString()));
            node.start();
        } catch(Throwable e) {
            e.printStackTrace();
        }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.node.NodeFactory

Copyright © 2018 www.massapicom. 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.