Examples of addContribution()


Examples of org.apache.tuscany.sca.node.SCANode.addContribution()

    protected URL[] addSubFolders(File repository) {
        URL[] folders = getSubFolders(repository);
        for (URL folderURL : folders) {
            try {
                SCANode scaNode = createNode(cp + "/" + folderURL);
                scaNode.addContribution(folderURL.toString(), folderURL);
                logger.info("added contribution: " + folderURL);
            } catch (Exception e) {
                e.printStackTrace();
                logger.log(Level.WARNING, "exception adding contribution: " + folderURL, e);
            }
View Full Code Here

Examples of org.apache.tuscany.sca.node.SCANode.addContribution()

        if (started && domainName == null) {
            scaNode.stop();
        }
       
        scaNode.addContribution(contributionURL.toString(), contributionURL);
        logger.info("added contribution: " + contributionURL);
       
        if (started) {
            if (domainName == null) {
                scaNode.addToDomainLevelComposite((QName)null);
View Full Code Here

Examples of org.apache.tuscany.sca.node.SCANode.addContribution()

           
            ClassLoader cl = CalculatorNode.class.getClassLoader();
            
            SCANodeFactory nodeFactory = SCANodeFactory.newInstance();
            SCANode node = nodeFactory.createSCANode(null, domainName);
            node.addContribution(nodeName, cl.getResource(nodeName + "/"));
            node.addToDomainLevelComposite((QName)null);          
                                        
            // nodeA is the head node and runs some tests while all other nodes
            // simply listen for incoming messages
            if ( nodeName.equals("nodeA") ) { 
View Full Code Here

Examples of org.apache.tuscany.sca.node.configuration.NodeConfiguration.addContribution()

                        for (String path : parse(listOfValues)) {
                            if ("".equals(path)) {
                                continue;
                            }
                            File f = new File(getResource(servletContext, path).toURI());
                            configuration.addContribution(f.toURI().toURL());
                        }
                    }
                } else if (name.equals(CONTRIBUTIONS) || name.startsWith(CONTRIBUTIONS + ".")) {
                    explicitContributions = true;
                    String listOfValues = (String)servletContext.getAttribute(name);
View Full Code Here

Examples of org.apache.tuscany.sca.node.configuration.NodeConfiguration.addContribution()

                                continue;
                            }
                            File f = new File(getResource(servletContext, path).toURI());
                            if (f.isDirectory()) {
                                for (File n : f.listFiles()) {
                                    configuration.addContribution(n.toURI().toURL());
                                }
                            } else {
                                configuration.addContribution(f.toURI().toURL());
                            }
                        }
View Full Code Here

Examples of org.apache.tuscany.sca.node.configuration.NodeConfiguration.addContribution()

                            if (f.isDirectory()) {
                                for (File n : f.listFiles()) {
                                    configuration.addContribution(n.toURI().toURL());
                                }
                            } else {
                                configuration.addContribution(f.toURI().toURL());
                            }
                        }
                    }
                }
            }
View Full Code Here

Examples of org.apache.tuscany.sca.node.configuration.NodeConfiguration.addContribution()

            }

            URL composite = getResource(servletContext, WEB_COMPOSITE);
            if (configuration.getContributions().isEmpty() || (!explicitContributions && composite != null)) {
                // TODO: Which path should be the default root
                configuration.addContribution(getResource(servletContext, ROOT));
            }
            if (composite != null) {
                configuration.getContributions().get(0).addDeploymentComposite(composite);
            }
            if (!explicitContributions) {
View Full Code Here

Examples of org.apache.tuscany.sca.node.configuration.NodeConfiguration.addContribution()

                URL url = getResource(servletContext, DEFAULT_CONTRIBUTIONS);
                if (url != null) {
                    File f = new File(url.toURI());
                    if (f.isDirectory()) {
                        for (File n : f.listFiles()) {
                            configuration.addContribution(n.toURI().toURL());
                        }
                    }
                }
            }
            String nodeURI = (String)servletContext.getAttribute(NODE_URI);
View Full Code Here

Examples of org.apache.tuscany.sca.node.configuration.NodeConfiguration.addContribution()

        }
        // Make sure a unique node URI is created for the same node factory
        configuration.setURI(generateNodeURI());
        if (contributions != null) {
            for (Contribution c : contributions) {
                configuration.addContribution(c.getURI(), c.getLocation());
            }
        }
        return configuration;
    }
View Full Code Here

Examples of org.apache.tuscany.sca.node.configuration.NodeConfiguration.addContribution()

        }
        // Make sure a unique node URI is created for the same node factory
        configuration.setURI(generateNodeURI());
        if (contributions != null) {
            for (Contribution c : contributions) {
                configuration.addContribution(c.getURI(), c.getLocation());
            }
        }
        return configuration;
    }
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.