Package org.apache.felix.ipojo.extender.internal.queue.pref

Examples of org.apache.felix.ipojo.extender.internal.queue.pref.HeaderPreferenceSelection


        BundleProcessor extensionBundleProcessor = new ExtensionBundleProcessor(m_logger);
        BundleProcessor componentsProcessor = new ComponentsBundleProcessor(m_logger);
        BundleProcessor configurationProcessor = new ConfigurationProcessor(m_logger);
        if (SYNCHRONOUS_PROCESSING_ENABLED) {
            m_queueService = new EnforcedQueueService(
                    new HeaderPreferenceSelection(),
                    new SynchronousQueueService(context),
                    Preference.SYNC,
                    m_logger);

            // If required, add the event proxy
            if (proxy != null) {
                m_queueService.addQueueListener(proxy);
            }
        } else {
            // Build a thread factory that will groups extender's thread together
            ThreadFactory threadFactory = new GroupThreadFactory(new ThreadGroup("iPOJO Extender"));
            threadFactory = new NamingThreadFactory(threadFactory);
            threadFactory = new PrefixedThreadFactory(threadFactory, "[iPOJO] ");

            // Create the queue services
            SynchronousQueueService sync = new SynchronousQueueService(context);
            ExecutorQueueService async = new ExecutorQueueService(context,
                                                                  Integer.getInteger(ExecutorQueueService.THREADPOOL_SIZE_PROPERTY,
                                                                                     1), // default to 1 if no system property is set
                                                                  threadFactory);
            m_queueService = new PreferenceQueueService(new HeaderPreferenceSelection(), sync, async);

            extensionBundleProcessor = new QueuingActivationProcessor(extensionBundleProcessor, m_queueService);
            componentsProcessor = new QueuingActivationProcessor(componentsProcessor, m_queueService);
            configurationProcessor = new QueuingActivationProcessor(configurationProcessor, m_queueService);
View Full Code Here

TOP

Related Classes of org.apache.felix.ipojo.extender.internal.queue.pref.HeaderPreferenceSelection

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.