Package org.apache.tuscany.sca.core.runtime

Examples of org.apache.tuscany.sca.core.runtime.CompositeActivator


         * @param composite
         * @return
         */
        public Composite addComposite(Composite composite) throws ActivationException {
            domainComposite.getIncludes().add(composite);
            CompositeActivator compositeActivator = runtime.getCompositeActivator();
            compositeActivator.activate(composite);
            for (Component component : composite.getComponents()) {
                components.put(component.getName(), component);
            }
            return composite;
        }
View Full Code Here


         * Remove a composite from the domain
         * @param composite
         * @throws ActivationException
         */
        public void removeComposite(Composite composite) throws ActivationException {
            CompositeActivator compositeActivator = runtime.getCompositeActivator();
            compositeActivator.deactivate(composite);
            domainComposite.getIncludes().remove(composite);
            for (Component component : composite.getComponents()) {
                components.remove(component.getName());
            }
        }
View Full Code Here

         * Start a composite
         * @param composite
         * @throws ActivationException
         */
        public void startComposite(Composite composite) throws ActivationException {
            CompositeActivator compositeActivator = runtime.getCompositeActivator();
            compositeActivator.start(composite);
        }
View Full Code Here

         * Stop a composite
         * @param composite
         * @throws ActivationException
         */
        public void stopComposite(Composite composite) throws ActivationException {
            CompositeActivator compositeActivator = runtime.getCompositeActivator();
            compositeActivator.stop(composite);
        }
View Full Code Here

           
        }


        // Activate and start the SCA domain composite
        CompositeActivator compositeActivator = runtime.getCompositeActivator();
        try {
            compositeActivator.activate(domainComposite);
            compositeActivator.start(domainComposite);
        } catch (ActivationException e) {
            throw new ServiceRuntimeException(e);
        }

        // Index the top level components
View Full Code Here

        } catch (ContributionException e) {
            throw new ServiceRuntimeException(e);
        }
       
        // Stop the SCA domain composite
        CompositeActivator compositeActivator = runtime.getCompositeActivator();
        try {
            compositeActivator.stop(domainComposite);
        } catch (ActivationException e) {
            throw new ServiceRuntimeException(e);

        }
View Full Code Here

        ProviderFactoryExtensionPoint providerFactories = new DefaultProviderFactoryExtensionPoint();
        registry.addExtensionPoint(providerFactories);
        providerFactories.addProviderFactory(new RuntimeSCABindingProviderFactory());

        // Create the composite activator
        CompositeActivator compositeActivator = new CompositeActivatorImpl(
                                                                           assemblyFactory, scaBindingFactory,
                                                                           mapper, scopeRegistry,
                                                                           workScheduler, wireProcessor,
                                                                           providerFactories);
View Full Code Here

        ProviderFactoryExtensionPoint providerFactories = new DefaultProviderFactoryExtensionPoint();
        registry.addExtensionPoint(providerFactories);
        providerFactories.addProviderFactory(new RuntimeSCABindingProviderFactory());

        // Create the composite activator
        CompositeActivator compositeActivator = new CompositeActivatorImpl(
                                                                           assemblyFactory, scaBindingFactory,
                                                                           mapper, scopeRegistry,
                                                                           workScheduler, wireProcessor,
                                                                           providerFactories);
View Full Code Here

         * Remove a composite from the domain
         * @param composite
         * @throws ActivationException
         */
        public void removeComposite(Composite composite) throws ActivationException {
            CompositeActivator compositeActivator = runtime.getCompositeActivator();
            compositeActivator.deactivate(composite);
            domainComposite.getIncludes().remove(composite);
            for (Component component : composite.getComponents()) {
                components.remove(component.getName());
            }
        }
View Full Code Here

         * @deprecated
         * @param composite
         * @throws ActivationException
         */
        public void startComposite(Composite composite) throws ActivationException {
            CompositeActivator compositeActivator = runtime.getCompositeActivator();
            compositeActivator.start(composite);
        }
View Full Code Here

TOP

Related Classes of org.apache.tuscany.sca.core.runtime.CompositeActivator

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.