Package org.apache.tuscany.sca.node

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


    private CalculatorService calculatorService;
    private SCANode2 node;

    @Override
    protected void setUp() throws Exception {
        SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
        node = nodeFactory.createSCANode(new File("src/main/resources/ReferenceNotFound/Calculator.composite").toURL().toString(),
                             new SCAContribution("TestContribution",
                                                 new File("src/main/resources/ReferenceNotFound").toURL().toString()));
        node.start();
        calculatorService = ((SCAClient)node).getService(CalculatorService.class, "CalculatorServiceComponent");
    }
View Full Code Here


            DomainManagerLauncher managerLauncher = DomainManagerLauncher.newInstance();
            manager = managerLauncher.createDomainManager();
            manager.start();
           
            SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
            nodeC  = nodeFactory.createSCANode("http://localhost:9990/node-image/NodeC");
            nodeB  = nodeFactory.createSCANode("http://localhost:9990/node-image/NodeB");
            nodeA  = nodeFactory.createSCANode("http://localhost:9990/node-image/NodeA");

            nodeC.start();
            nodeB.start();
            nodeA.start();
           
View Full Code Here

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

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

       
        // Determine the node image URI
        String nodeImage = NodeImplementationLauncherUtil.nodeImageURI(nodeName);
       
        // Create the SCA node
        SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
        node = nodeFactory.createSCANode(nodeImage);
       
        // Register the Servlet host
        ServletHostExtensionPoint servletHosts = servletHosts(node);
        servletHosts.getServletHosts().clear();
        servletHosts.addServletHost(servletHost);
View Full Code Here

       
        // Determine the node image URI
        String nodeImage = NodeImplementationLauncherUtil.nodeImageURI(nodeName);
       
        // Create the SCA node
        SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
        node = nodeFactory.createSCANode(nodeImage);
       
        // Register the Servlet host
        ServletHostExtensionPoint servletHosts = servletHosts(node);
        servletHosts.getServletHosts().clear();
        servletHosts.addServletHost(servletHost);
View Full Code Here

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

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

     * Expected result: Method must be called. Method must be called after all property
     * and reference injection is complete.
     */
    @Test
    public void atInitProper() throws Exception {
        SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
        SCANode2 node = nodeFactory.createSCANode(new File("src/main/resources/proper/AService.composite").toURL().toString(),
                new SCAContribution("TestContribution",
                                    new File("src/main/resources/proper").toURL().toString()));
        node.start();
        AService aService = ((SCAClient)node).getService(AService.class, "AComponent");
        Assert.assertTrue(aService.isInitProper());
View Full Code Here

     * This method tests that an exception is thrown when a protected method is
     * annotated with "@Init".
     */
    @Test
    public void atInitProtectedMethod() throws Exception {
        SCANode2Factory nodeFactory = SCANode2Factory.newInstance();
        try {
            SCANode2 node = nodeFactory.createSCANode(new File("src/main/resources/err1/AServiceErr1.composite").toURL().toString(),
                    new SCAContribution("TestContribution",
                                        new File("src/main/resources/err1").toURL().toString()));
            Assert.fail();
            node.stop();
        } catch(ServiceRuntimeException e) {
View Full Code Here

TOP

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

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.