Package org.apache.tuscany.sca.implementation.node

Examples of org.apache.tuscany.sca.implementation.node.NodeImplementationFactory


        }
    }

    private ConfiguredNodeImplementation findNodeConfiguration(final String compositeURI, ClassLoader classLoader)
        throws Exception {
        NodeImplementationFactory nodeImplementationFactory =
            modelFactories.getFactory(NodeImplementationFactory.class);
        ConfiguredNodeImplementation config = nodeImplementationFactory.createConfiguredNodeImplementation();

        if (classLoader == null) {
            classLoader = Thread.currentThread().getContextClassLoader();
        }
        String contributionArtifactPath = compositeURI;
View Full Code Here


            if (contributions == null || contributions.length == 0) {
                configuration = findNodeConfiguration(compositeURI, null);
            } else {

                // Create a node configuration
                NodeImplementationFactory nodeImplementationFactory =
                    modelFactories.getFactory(NodeImplementationFactory.class);
                configuration = nodeImplementationFactory.createConfiguredNodeImplementation();

                Composite composite = createComposite(compositeURI);
                configuration.setComposite(composite);

                // Create contribution models
View Full Code Here

            ConfiguredNodeImplementation configuration = null;
            if (contributions == null || contributions.length == 0) {
                configuration = findNodeConfiguration(compositeURI, null);
            } else {
                // Create a node configuration
                NodeImplementationFactory nodeImplementationFactory =
                    modelFactories.getFactory(NodeImplementationFactory.class);
                configuration = nodeImplementationFactory.createConfiguredNodeImplementation();

                // Read the composite model
                StAXArtifactProcessor<Composite> compositeProcessor = artifactProcessors.getProcessor(Composite.class);
                URL compositeURL = new URL(compositeURI);
                logger.log(Level.INFO, "Loading composite: " + compositeURL);
View Full Code Here

        try {
            // Initialize the runtime
            initRuntime();
           
            // Create a node configuration
            NodeImplementationFactory nodeImplementationFactory = modelFactories.getFactory(NodeImplementationFactory.class);
            ConfiguredNodeImplementation configuration = nodeImplementationFactory.createConfiguredNodeImplementation();
           
            // Create composite model
            AssemblyFactory assemblyFactory = modelFactories.getFactory(AssemblyFactory.class);
            Composite composite = assemblyFactory.createComposite();
            composite.setURI(compositeURI);
View Full Code Here

        mapper = new InterfaceContractMapperImpl();
        inputFactory = XMLInputFactory.newInstance();
        staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(new DefaultModelFactoryExtensionPoint());
        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, XMLInputFactory.newInstance(), XMLOutputFactory.newInstance());
       
        NodeImplementationFactory nodeFactory = new NodeImplementationFactoryImpl();
        factories.addFactory(nodeFactory);
       
        NodeImplementationProcessor nodeProcessor = new NodeImplementationProcessor(factories);
        staxProcessors.addArtifactProcessor(nodeProcessor);
        ConfiguredNodeImplementationProcessor configuredNodeProcessor = new ConfiguredNodeImplementationProcessor(factories);
View Full Code Here

        factories.addFactory(policyFactory);
       
        staxProcessors = new DefaultStAXArtifactProcessorExtensionPoint(new DefaultModelFactoryExtensionPoint());
        staxProcessor = new ExtensibleStAXArtifactProcessor(staxProcessors, XMLInputFactory.newInstance(), XMLOutputFactory.newInstance());
       
        NodeImplementationFactory nodeFactory = new NodeImplementationFactoryImpl();
        factories.addFactory(nodeFactory);
       
        staxProcessors.addArtifactProcessor(new CompositeProcessor(new DefaultContributionFactory(), factory, policyFactory, staxProcessor));
        staxProcessors.addArtifactProcessor(new ComponentTypeProcessor(factory, policyFactory, staxProcessor));
        staxProcessors.addArtifactProcessor(new ConstrainingTypeProcessor(factory, policyFactory, staxProcessor));
View Full Code Here

        try {
            // Initialize the runtime
            init();

            // Create a node configuration
            NodeImplementationFactory nodeImplementationFactory = modelFactories.getFactory(NodeImplementationFactory.class);
            ConfiguredNodeImplementation configuration = nodeImplementationFactory.createConfiguredNodeImplementation();

            if (compositeURI != null) {
                Composite composite = assemblyFactory.createComposite();
                composite.setURI(compositeURI);
                composite.setUnresolved(true);
View Full Code Here

        try {
            // Initialize the runtime
            init();

            // Create a node configuration
            NodeImplementationFactory nodeImplementationFactory = modelFactories.getFactory(NodeImplementationFactory.class);
            ConfiguredNodeImplementation configuration = nodeImplementationFactory.createConfiguredNodeImplementation();

            if (compositeURI != null) {
                Composite composite = assemblyFactory.createComposite();
                composite.setURI(compositeURI);
                composite.setUnresolved(true);
View Full Code Here

        try {
            // Initialize the runtime
            init();

            // Create a node configuration
            NodeImplementationFactory nodeImplementationFactory = modelFactories.getFactory(NodeImplementationFactory.class);
            ConfiguredNodeImplementation configuration = nodeImplementationFactory.createConfiguredNodeImplementation();

            // Read the composite model
            logger.log(Level.INFO, "Loading composite: " + compositeURI);

            XMLStreamReader reader = inputFactory.createXMLStreamReader(new ByteArrayInputStream(compositeContent.getBytes("UTF-8")));
View Full Code Here

        this.bundleContext = bundleContext;
    }

    private ConfiguredNodeImplementation getNodeConfiguration(Bundle bundle) {
        // Create a node configuration
        NodeImplementationFactory nodeImplementationFactory =
            modelFactories.getFactory(NodeImplementationFactory.class);
        ConfiguredNodeImplementation configuration = nodeImplementationFactory.createConfiguredNodeImplementation();

        String compositeURI = (String)bundle.getHeaders().get("SCA-Composite");
        if (compositeURI == null) {
            compositeURI = "OSGI-INF/sca/bundle.composite";
        }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.implementation.node.NodeImplementationFactory

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.