Package org.apache.tuscany.sca.node

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


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


       
        // now start another node and try call back in to get the
        // async response to come back
       
        System.out.println("Starting second node");
        final NodeFactory nf = NodeFactory.getInstance();
        String here = SampleNativeAsyncTestCase.class.getProtectionDomain().getCodeSource().getLocation().toString();
        // Create the node using the pattern "name of composite file to start" / Contribution to use
        node = nf.createNode("testnativeasync.composite", new Contribution("test", here));
        node.start();
        upper = node.getService(Upper.class, "SampleNativeAsyncReference");
        r = upper.upper2("async2");
        System.out.println(r);
        assertEquals("ASYNC2", r);
View Full Code Here

public class RunTestCase {
    static Node node;

    @BeforeClass
    public static void setUp() throws Exception {
        final NodeFactory nf = NodeFactory.newInstance();
        node = nf.createNode("test.composite", new Contribution("test", here()));
        node.start();
    }
View Full Code Here

    private static Node clientNode;
//    private static DomainNode clientNode;

    @BeforeClass
    public static void setUpBeforeClass() throws Exception {
        NodeFactory factory = NodeFactory.newInstance();

        clientNode = factory.createNode(new File("client-config.xml").toURI().toURL());
       
        try {
            clientNode.start();
        } catch (Exception ex){
            ex.printStackTrace();
View Full Code Here

        public void start() {
            threadContextClassLoader = Thread.currentThread().getContextClassLoader();
            boolean started = false;
            try {
                Thread.currentThread().setContextClassLoader(runtimeClassLoader);
                NodeFactory factory = NodeFactory.newInstance();
                String contribution = ContributionLocationHelper.getContributionLocation(getClass());
                daemon = factory.createNode("NodeDaemon.composite", new Contribution("node-runtime", contribution));
                started = true;
            } finally {
                if (!started) {
                    Thread.currentThread().setContextClassLoader(threadContextClassLoader);
                }
View Full Code Here

       
        // Determine the node configuration URI
        String nodeConfiguration = NodeImplementationLauncherUtil.nodeConfigurationURI(nodeName);
       
        // Create the SCA node
        NodeFactory nodeFactory = NodeFactory.newInstance();
        node = nodeFactory.createNode(nodeConfiguration);
       
        // Register the Servlet host
        ServletHostExtensionPoint servletHosts = servletHosts(node);
        servletHosts.getServletHosts().clear();
        servletHosts.addServletHost(servletHost);
View Full Code Here

        servletContext = config.getServletContext();
        if (servletContext.getAttribute(SCA_NODE_ATTRIBUTE) == null) {
            initContextPath(config);
            contributionRoot = getContributionRoot(servletContext);
            NodeFactory factory = NodeFactory.newInstance();
            node = factory.createNode("WEB-INF/web.composite", new Contribution(contributionRoot, contributionRoot));
            node.start();
            servletContext.setAttribute(SCA_NODE_ATTRIBUTE, node);
        }

        // Initialize the registered Servlets
View Full Code Here

     * Bootstrap a new SCA node.
     *
     * @param configurationURI
     */
    public NodeImplementationLauncherBootstrap(String configurationURI) throws Exception {
        NodeFactory nodeFactory = NodeFactory.newInstance();
        node = new NodeFacade(nodeFactory.createNode(configurationURI));
    }
View Full Code Here

     * @param compositeURI
     * @param uris
     * @param locations
     */
    public NodeImplementationLauncherBootstrap(String compositeURI, String[] uris, String[] locations) throws Exception {
        NodeFactory nodeFactory = NodeFactory.newInstance();
        Contribution[] contributions = new Contribution[uris.length];
        for (int i = 0; i < uris.length; i++) {
            contributions[i] = new Contribution(uris[i], locations[i]);
        }
        node = new NodeFacade(nodeFactory.createNode(compositeURI, contributions));
    }
View Full Code Here

     * @param compositeURI
     * @param uris
     * @param locations
     */
    public NodeImplementationLauncherBootstrap(String compositeURI, String compositeContent, String[] uris, String[] locations) throws Exception {
        NodeFactory nodeFactory = NodeFactory.newInstance();
        Contribution[] contributions = new Contribution[uris.length];
        for (int i = 0; i < uris.length; i++) {
            contributions[i] = new Contribution(uris[i], locations[i]);
        }
        node = new NodeFacade(nodeFactory.createNode(compositeURI, compositeContent, contributions));
    }
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.