Examples of DelayedReferenceContainer


Examples of com.volantis.osgi.cm.dispatcher.DelayedReferenceContainer

                dispatcherThread, dispatcherExpectations);

        adminServiceReferenceMock =
                new ServiceReferenceMock("adminServiceReferenceMock");

        DelayedReferenceContainer referenceContainer =
                new DelayedReferenceContainer();
        referenceContainer.setReference(adminServiceReferenceMock);

        // Create a bundle context that can be used across thread. This can
        // also be used to add expectations for the current thread.
        contextMock = new BundleContextMock("contextMock",
                perThreadExpectations);
View Full Code Here

Examples of com.volantis.osgi.cm.dispatcher.DelayedReferenceContainer

        pluginManagerMock = new PluginManagerMock(
                "pluginManagerMock", expectations);

        logServiceMock = new LogServiceMock("logServiceMock", expectations);

        DelayedReferenceContainer referenceContainer =
                new DelayedReferenceContainer();
        referenceContainer.setReference(null);

        return new ConfigurationAdminManager(
                contextMock, logServiceMock, dispatcherMock, storeMock);
    }
View Full Code Here

Examples of com.volantis.osgi.cm.dispatcher.DelayedReferenceContainer

        // Create a background thread to process tasks added to the queue.
        asynchronousDispatcher = new AsynchronousDispatcher();

        // Create a container to the admin reference.
        DelayedReferenceContainer delayedReferenceContainer =
                new DelayedReferenceContainer();

        PluginManager pluginManager =
                new PluginManagerImpl(log);

        Dispatcher dispatcher =
                new DispatcherImpl(bundleContext, log, asynchronousDispatcher,
                        delayedReferenceContainer, pluginManager);

        File rootDir = bundleContext.getDataFile("");
        if (rootDir == null) {
            throw new IOException(
                    "Cannot persist configuration as cannot access file" +
                            " system");
        }

        FileManager fileManager = new FileManagerImpl(
                rootDir, MAX_FILES_PER_DIR, MAX_DIRS_PER_DIR);

        ConfigurationStore store = new ConfigurationStoreImpl(fileManager);

        ConfigurationManager manager =
                new ConfigurationAdminManager(bundleContext,
                        log, dispatcher, store);

        tracker = new ConfigurationServiceTracker(
                bundleContext, manager,
                pluginManager);

        ServiceRegistration registration = bundleContext
                .registerService(ConfigurationAdmin.class.getName(),
                        manager, null);
        ServiceReference adminServiceReference = registration.getReference();
        delayedReferenceContainer.setReference(adminServiceReference);

        tracker.start();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.