Package org.apache.tuscany.sca.node

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


    @Before
    public void startServer() throws Exception {
        node =
            SCANodeFactory.newInstance()
                .createSCANode("trips.composite",
                               new SCAContribution("introducing-trips",
                                                   "../../contributions/introducing-trips/target/classes"));
        node.start();
    }
View Full Code Here


    private SCANode node;

    @Before
    public void startServer() throws Exception {
        node = SCANodeFactory.newInstance().createSCANode("tours-impl-include-client.composite",
                   new SCAContribution("introducing-trips", "../introducing-trips/target/classes"),
                   new SCAContribution("buildingblocks", "../buildingblocks/target/classes"),
                   new SCAContribution("buildingblocks-client", "./target/classes"));

        node.start();
    }
View Full Code Here

    private SCANode node;

    @Before
    public void startServer() throws Exception {
        node = SCANodeFactory.newInstance().createSCANode("tours-impl-client.composite",
                   new SCAContribution("buildingblocks", "../buildingblocks/target/classes"),
                   new SCAContribution("buildingblocks-client", "./target/classes"));

        node.start();
    }
View Full Code Here

import scatours.notification.Notification;

public class NotificationJMSLauncher {

    public static void main(String[] args) throws Exception {
        SCAContribution notificationContribution = locate("notification");
        SCAContribution notificationJMSContribution = locate("notification-jms");

        SCANode node =
            SCANodeFactory.newInstance().createSCANode("notification-jms.composite",
                                                       notificationContribution,
                                                       notificationJMSContribution);
View Full Code Here

     */
    public NodeImplementationLauncherBootstrap(String compositeURI, String[] uris, String[] locations) throws Exception {
        SCANodeFactory nodeFactory = SCANodeFactory.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

     */
    public NodeImplementationLauncherBootstrap(String compositeURI, String compositeContent, String[] uris, String[] locations) throws Exception {
        SCANodeFactory nodeFactory = SCANodeFactory.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, compositeContent, contributions));
    }
View Full Code Here

        if (composites != null && composites.length > 1) {
            // Create an aggregated composite that includes all the composites as Node API only takes one composite
            String content = createDeploymentComposite(applicationClassLoader, composites);
            // Create SCA contributions
            for (String location : contributionURLs) {
                contributions.add(new SCAContribution(location, location));
            }
            node =
                factory.createSCANode("http://tuscany.apache.org/xmlns/sca/1.0/aggregated", content, contributions
                    .toArray(new SCAContribution[contributions.size()]));
        } else {
            for (String location : contributionURLs) {
                contributions.add(new SCAContribution(location, location));
            }
            String composite = (composites != null && composites.length >= 1) ? composites[0] : null;
            if (!contributions.isEmpty()) {
                node =
                    factory.createSCANode(composite, contributions.toArray(new SCAContribution[contributions.size()]));
View Full Code Here

    private Contribution getContribution(URL contributionArtifactURL, String contributionArtifactPath) {
        URL contributionURL = getContributionURL(contributionArtifactURL, contributionArtifactPath);

        ContributionFactory contributionFactory = modelFactories.getFactory(ContributionFactory.class);

        SCAContribution contribution = new SCAContribution(contributionURL.toString(), contributionURL.toString());
        Contribution c = createContribution(contributionFactory, contribution);
        return c;
    }
View Full Code Here

    @Before
    public void init() {
        SCANodeFactory factory = SCANodeFactory.newInstance();
        node = factory.createSCANode("jmsuserprop/helloworld.composite",
                                     new SCAContribution("test", "./target/classes"));

        node.start();
    }
View Full Code Here

    @Before
    public void init() {
        SCANodeFactory factory = SCANodeFactory.newInstance();
        node = factory.createSCANode("jmsdefault/helloworld.composite",
                                     new SCAContribution("test", "./target/classes"));

        node.start();
    }
View Full Code Here

TOP

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

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.