Package org.apache.tuscany.sca.deployment

Examples of org.apache.tuscany.sca.deployment.Deployer


        TuscanyRuntime tuscanyRuntime = TuscanyRuntime.newInstance();
        Node node = tuscanyRuntime.createNode("myDomain");
       
        node.installContribution("foo", "src/test/resources/sample-helloworld-nodeployable.jar", null, null);

        Deployer deployer = tuscanyRuntime.getDeployer();
        Monitor monitor = deployer.createMonitor();
        Composite composite = deployer.loadXMLDocument(new File("src/test/resources/helloworld2.composite").toURI().toURL(), monitor);
        monitor.analyzeProblems();
        String cmpuri = node.addDeploymentComposite("foo", composite);
        node.startComposite("foo", cmpuri);
        Map<String, List<String>> dcs = node.getStartedCompositeURIs();
        Assert.assertEquals(1, dcs.size());
View Full Code Here


        Hashtable<String, Object> props = new Hashtable<String, Object>();
        props.put(RemoteConstants.REMOTE_CONFIGS_SUPPORTED, new String[] {"org.osgi.sca"});
       
        ExtensionPointRegistry registry = exporter.getExtensionPointRegistry();
        UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
        Deployer deployer = utilities.getUtility(Deployer.class);
        Definitions definitions = deployer.getSystemDefinitions();

        String[] intents = new String[definitions.getIntents().size()];
        int i = 0;
        for (Intent intent : definitions.getIntents()) {
            intents[i++] = intent.toString();
View Full Code Here

        Hashtable<String, Object> props = new Hashtable<String, Object>();
        props.put(RemoteConstants.REMOTE_CONFIGS_SUPPORTED, new String[] {"org.osgi.sca"});
       
        ExtensionPointRegistry registry = exporter.getExtensionPointRegistry();
        UtilityExtensionPoint utilities = registry.getExtensionPoint(UtilityExtensionPoint.class);
        Deployer deployer = utilities.getUtility(Deployer.class);
        Definitions definitions = deployer.getSystemDefinitions();

        String[] intents = new String[definitions.getIntents().size()];
        int i = 0;
        for (Intent intent : definitions.getIntents()) {
            intents[i++] = intent.toString();
View Full Code Here

*/
public class ContributionTestCase {

    @Test
    public void testRead() throws Exception {
        Deployer deployer = new DefaultDeployer();
        File file = new File("../../samples/binding-sca/contribution-calculator/target/sample-contribution-binding-sca-calculator.jar");
        URL url = file.toURI().toURL();
        Monitor monitor = deployer.createMonitor();
        Contribution contribution = deployer.loadContribution(url.toURI(), url, monitor);
        deployer.build(Arrays.asList(contribution), Arrays.asList(contribution), null, monitor);
       
        // Ferkle around in the contribution verifying it looks as expected
        Assert.assertNotNull(contribution);
        List<Composite> deployables = contribution.getDeployables();
        Assert.assertEquals(2, deployables.size());
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.deployment.Deployer

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.