Package org.osgi.service.cm

Examples of org.osgi.service.cm.ConfigurationEvent


                Activator.log.error("ConfigurationImpl.delete: Could not get service reference");
                return;
            }

            //TODO join this with the update call. no need for parallel async delivery
            ConfigurationAdminFactory.this.sendEvent(new ConfigurationEvent(
                                                                                reference,
                                                                                ConfigurationEvent.CM_DELETED,
                                                                                factoryPid,
                                                                                servicePid
                                                                                                                                                        )
View Full Code Here


            {
                Activator.log.error("ConfigurationImpl.update: Could not get service reference for event delivery");
                return;
            }
            //TODO join this with the update call. no need for parallel async delivery
            ConfigurationAdminFactory.this.sendEvent(new ConfigurationEvent(
                                                                                                                                        reference,
                                                                                                                                        ConfigurationEvent.CM_UPDATED,
                                                                                                                                        factoryPid,
                                                                                                                                        servicePid
                                                                                                                                                        )
View Full Code Here

            Configuration[] configs = findConfigurations((ConfigurationAdmin) configurationAdmin, null);
            if (configs != null)
            {
                for (int i = 0; i < configs.length; i++)
                {
                    ConfigurationEvent cfgEvent = new ConfigurationEvent(configurationAdminReference,
                        ConfigurationEvent.CM_UPDATED, configs[i].getFactoryPid(), configs[i].getPid());
                    configurationEvent(cfgEvent);
                }
            }
        }
View Full Code Here

        private ConfigurationEvent getConfigurationEvent()
        {
            if ( event == null )
            {
                this.event = new ConfigurationEvent( getServiceReference(), type, factoryPid, pid );
            }
            return event;
        }
View Full Code Here

        private ConfigurationEvent getConfigurationEvent()
        {
            if ( event == null )
            {
                this.event = new ConfigurationEvent( getServiceReference(), type, factoryPid, pid );
            }
            return event;
        }
View Full Code Here

                        ConfigurationEvent.class))
                .description(description + ": configurationEvent")
                .does(new MethodAction() {
                    public Object perform(MethodActionEvent event)
                            throws Throwable {
                        ConfigurationEvent ce =
                                (ConfigurationEvent) event.getArgument(
                                        ConfigurationEvent.class);

                        assertEquals(expectedPid, ce.getPid());
                        assertEquals(expectedFactoryPid, ce.getFactoryPid());
                        assertEquals(adminServiceReferenceMock,
                                ce.getReference());
                        assertEquals(expectedEventType, ce.getType());
                        return null;
                    }
                });
    }
View Full Code Here

        // Get the actual reference from the container.
        ServiceReference adminServiceReference =
                adminReferenceContainer.getReference();

        ConfigurationEvent event =
                new ExtendedConfigurationEvent(adminServiceReference,
                        type, factoryPid, pid);

        for (int i = 0; i < references.length; i++) {
            ServiceReference reference = references[i];
View Full Code Here

        @SuppressWarnings("unchecked")
        ServiceReference<ConfigurationAdmin> cmRef = EasyMock.createMock(ServiceReference.class);
        EasyMock.replay(cmRef);

        ConfigurationEvent event = new ConfigurationEvent(cmRef, ConfigurationEvent.CM_UPDATED, null, testPid);

        assertEquals("Precondition", 0, generateCalled.size());
        scct.configurationEvent(event);
        assertEquals(1, generateCalled.size());
        assertEquals(testPid, generateCalled.iterator().next());
View Full Code Here

        scct.init();

        @SuppressWarnings("unchecked")
        ServiceReference<ConfigurationAdmin> cmRef = EasyMock.createMock(ServiceReference.class);
        EasyMock.replay(cmRef);
        ConfigurationEvent event = new ConfigurationEvent(cmRef, ConfigurationEvent.CM_UPDATED, null, "test123");

        scct.configurationEvent(event);
        EasyMock.verify(cm); // Ensure that this doesn't cause any unwanted calls on ConfigAdmin
    }
View Full Code Here

        scct.init();

        @SuppressWarnings("unchecked")
        ServiceReference<ConfigurationAdmin> cmRef = EasyMock.createMock(ServiceReference.class);
        EasyMock.replay(cmRef);
        ConfigurationEvent event = new ConfigurationEvent(cmRef, ConfigurationEvent.CM_DELETED, null, testPid);

        Configuration c1 = EasyMock.createMock(Configuration.class);
        c1.delete();
        EasyMock.expectLastCall().once();
        EasyMock.replay(c1);
View Full Code Here

TOP

Related Classes of org.osgi.service.cm.ConfigurationEvent

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.